mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-12 09:37:37 +01:00
c7ea0c5958
- Mac: 10.13 is now the minimum required macOS version
26 lines
1.3 KiB
Diff
26 lines
1.3 KiB
Diff
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
|
|
index acd60381a6294..f9be70d2da75f 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"
|
|
@@ -344,6 +345,12 @@ std::string GetMajorVersionForUserAgentString(
|
|
std::string GetProductAndVersion(
|
|
ForceMajorVersionToMinorPosition force_major_to_minor,
|
|
UserAgentReductionEnterprisePolicyState user_agent_reduction) {
|
|
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
|
+ if (command_line->HasSwitch(switches::kUserAgentProductAndVersion)) {
|
|
+ return command_line->GetSwitchValueASCII(
|
|
+ switches::kUserAgentProductAndVersion);
|
|
+ }
|
|
+
|
|
if (ShouldForceMajorVersionToMinorPosition(force_major_to_minor)) {
|
|
// Force major version to 99 and major version to minor version position.
|
|
if (ShouldReduceUserAgentMinorVersion(user_agent_reduction)) {
|