mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-15 02:54:20 +01:00
26 lines
1.2 KiB
Diff
26 lines
1.2 KiB
Diff
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
|
index 958a61892a19d..e137ebe5a4146 100644
|
|
--- components/embedder_support/user_agent_utils.cc
|
|
+++ components/embedder_support/user_agent_utils.cc
|
|
@@ -15,6 +15,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/pref_names.h"
|
|
#include "components/embedder_support/switches.h"
|
|
#include "components/policy/core/common/policy_pref_names.h"
|
|
@@ -318,6 +319,12 @@ std::string GetMajorVersionForUserAgentString(
|
|
|
|
std::string GetProduct(const bool allow_version_override,
|
|
ForceMajorVersionToMinorPosition force_major_to_minor) {
|
|
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
|
+ if (command_line->HasSwitch(switches::kUserAgentProductAndVersion)) {
|
|
+ return command_line->GetSwitchValueASCII(
|
|
+ switches::kUserAgentProductAndVersion);
|
|
+ }
|
|
+
|
|
// Force major version to 99 and minor version to major position.
|
|
if (allow_version_override &&
|
|
ShouldForceMajorVersionToMinorPosition(force_major_to_minor))
|