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-09-20 11:06:23 +02:00
|
|
|
index dfa5022f7636e..fa880d2ea9acd 100644
|
2021-03-04 23:36:57 +01:00
|
|
|
--- components/embedder_support/user_agent_utils.cc
|
|
|
|
+++ components/embedder_support/user_agent_utils.cc
|
2021-09-20 11:06:23 +02:00
|
|
|
@@ -12,6 +12,7 @@
|
2021-07-23 18:40:13 +02:00
|
|
|
#include "base/system/sys_info.h"
|
2021-03-04 23:36:57 +01:00
|
|
|
#include "build/branding_buildflags.h"
|
2021-09-20 11:06:23 +02:00
|
|
|
#include "build/build_config.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-09-20 11:06:23 +02:00
|
|
|
@@ -113,6 +114,12 @@ std::string GetUniversalApiContractVersion() {
|
|
|
|
#endif // defined(OS_WIN)
|
2021-03-04 23:36:57 +01:00
|
|
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
|