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-06-04 03:34:56 +02:00
|
|
|
index 1f8de242c42d0..4ba07378b94a3 100644
|
2021-03-04 23:36:57 +01:00
|
|
|
--- components/embedder_support/user_agent_utils.cc
|
|
|
|
+++ components/embedder_support/user_agent_utils.cc
|
2021-06-04 03:34:56 +02:00
|
|
|
@@ -8,6 +8,7 @@
|
|
|
|
#include "base/no_destructor.h"
|
2021-03-04 23:36:57 +01:00
|
|
|
#include "base/strings/strcat.h"
|
|
|
|
#include "build/branding_buildflags.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"
|
|
|
|
#include "components/version_info/version_info.h"
|
|
|
|
#include "content/public/browser/web_contents.h"
|
2021-06-04 03:34:56 +02:00
|
|
|
@@ -21,6 +22,12 @@
|
2021-03-04 23:36:57 +01:00
|
|
|
namespace embedder_support {
|
|
|
|
|
|
|
|
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
|
|
|
+
|
|
|
|
return version_info::GetProductNameAndVersionForUserAgent();
|
|
|
|
}
|
|
|
|
|