cef/patch/patches/embedder_product_override.patch
Marshall Greenblatt 66648c2343 Update to Chromium version 97.0.4692.0 (#938553)
- Remove CefRequestContextHandler::OnBeforePluginLoad and
  CefRequestContext::PurgePluginListCache (fixes issue #3047). These methods
  stopped being relevant after the removal of Flash support in January 2021.
  The last remaining PPAPI plugin (PDF viewer) will switch to a non-plugin
  implementation in the near future (see https://crbug.com/702993#c58) and
  functionality related to plugin filtering has already been removed in
  https://crrev.com/343ae351c9.
2021-11-15 14:25:16 -05:00

26 lines
1.1 KiB
Diff

diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index 79ea44500f6e7..f1c4da868f12e 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/policy/core/common/policy_pref_names.h"
#include "components/prefs/pref_service.h"
@@ -189,6 +190,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();