mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-19 05:04:08 +01:00
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
|
index 516504c2ce442..60899c8e4f7bf 100644
|
|
--- components/embedder_support/user_agent_utils.cc
|
|
+++ components/embedder_support/user_agent_utils.cc
|
|
@@ -14,6 +14,7 @@
|
|
#include "base/version.h"
|
|
#include "build/branding_buildflags.h"
|
|
#include "build/build_config.h"
|
|
+#include "cef/libcef/common/cef_switches.h"
|
|
#include "components/embedder_support/switches.h"
|
|
#include "components/version_info/version_info.h"
|
|
#include "content/public/browser/web_contents.h"
|
|
@@ -172,6 +173,12 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
|
|
} // namespace
|
|
|
|
std::string GetProduct() {
|
|
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
|
+ if (command_line->HasSwitch(switches::kUserAgentProductAndVersion)) {
|
|
+ return command_line->GetSwitchValueASCII(
|
|
+ switches::kUserAgentProductAndVersion);
|
|
+ }
|
|
+
|
|
if (base::FeatureList::IsEnabled(
|
|
blink::features::kForceMajorVersion100InUserAgent))
|
|
return "Chrome/" + GetM100VersionNumber();
|