2021-03-04 23:36:57 +01:00
|
|
|
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
2021-11-10 22:57:31 +01:00
|
|
|
index 79ea44500f6e7..f1c4da868f12e 100644
|
2021-03-04 23:36:57 +01:00
|
|
|
--- components/embedder_support/user_agent_utils.cc
|
|
|
|
+++ components/embedder_support/user_agent_utils.cc
|
2021-10-19 00:17:16 +02:00
|
|
|
@@ -14,6 +14,7 @@
|
|
|
|
#include "base/version.h"
|
2021-03-04 23:36:57 +01:00
|
|
|
#include "build/branding_buildflags.h"
|
2021-09-20 11:06:23 +02:00
|
|
|
#include "build/build_config.h"
|
2021-04-27 18:39:09 +02:00
|
|
|
+#include "cef/libcef/common/cef_switches.h"
|
2021-03-04 23:36:57 +01:00
|
|
|
#include "components/embedder_support/switches.h"
|
2021-11-10 22:57:31 +01:00
|
|
|
#include "components/policy/core/common/policy_pref_names.h"
|
|
|
|
#include "components/prefs/pref_service.h"
|
|
|
|
@@ -189,6 +190,12 @@ const blink::UserAgentBrandList& GetBrandVersionList(
|
2021-10-19 00:17:16 +02:00
|
|
|
} // namespace
|
2021-03-04 23:36:57 +01:00
|
|
|
|
|
|
|
std::string GetProduct() {
|
|
|
|
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
2021-04-27 18:39:09 +02:00
|
|
|
+ if (command_line->HasSwitch(switches::kUserAgentProductAndVersion)) {
|
|
|
|
+ return command_line->GetSwitchValueASCII(
|
|
|
|
+ switches::kUserAgentProductAndVersion);
|
|
|
|
+ }
|
2021-03-04 23:36:57 +01:00
|
|
|
+
|
2021-10-19 00:17:16 +02:00
|
|
|
if (base::FeatureList::IsEnabled(
|
|
|
|
blink::features::kForceMajorVersion100InUserAgent))
|
|
|
|
return "Chrome/" + GetM100VersionNumber();
|