mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
 | |
| index 1856966f2b913..6d7ecb4549502 100644
 | |
| --- components/embedder_support/user_agent_utils.cc
 | |
| +++ components/embedder_support/user_agent_utils.cc
 | |
| @@ -21,6 +21,7 @@
 | |
|  #include "base/version.h"
 | |
|  #include "build/branding_buildflags.h"
 | |
|  #include "build/build_config.h"
 | |
| +#include "cef/libcef/features/features.h"
 | |
|  #include "components/embedder_support/pref_names.h"
 | |
|  #include "components/embedder_support/switches.h"
 | |
|  #include "components/policy/core/common/policy_pref_names.h"
 | |
| @@ -41,6 +42,10 @@
 | |
|  #include "base/win/windows_version.h"
 | |
|  #endif  // BUILDFLAG(IS_WIN)
 | |
|  
 | |
| +#if BUILDFLAG(ENABLE_CEF)
 | |
| +#include "cef/libcef/common/cef_switches.h"
 | |
| +#endif
 | |
| +
 | |
|  namespace embedder_support {
 | |
|  
 | |
|  namespace {
 | |
| @@ -315,6 +320,14 @@ blink::UserAgentBrandList ShuffleBrandList(
 | |
|  
 | |
|  std::string GetProductAndVersion(
 | |
|      UserAgentReductionEnterprisePolicyState user_agent_reduction) {
 | |
| +#if BUILDFLAG(ENABLE_CEF)
 | |
| +  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
 | |
| +  if (command_line->HasSwitch(switches::kUserAgentProductAndVersion)) {
 | |
| +    return command_line->GetSwitchValueASCII(
 | |
| +        switches::kUserAgentProductAndVersion);
 | |
| +  }
 | |
| +#endif
 | |
| +
 | |
|    return ShouldReduceUserAgentMinorVersion(user_agent_reduction)
 | |
|               ? version_info::GetProductNameAndVersionForReducedUserAgent(
 | |
|                     blink::features::kUserAgentFrozenBuildVersion.Get())
 |