2019-05-02 20:06:48 +02:00
|
|
|
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
2020-07-08 19:23:29 +02:00
|
|
|
index d27f4eb65fa9..9bf1bde37e63 100644
|
2019-05-02 20:06:48 +02:00
|
|
|
--- chrome/browser/chrome_content_browser_client.cc
|
|
|
|
+++ chrome/browser/chrome_content_browser_client.cc
|
2020-07-08 19:23:29 +02:00
|
|
|
@@ -1021,10 +1021,6 @@ void LaunchURL(const GURL& url,
|
2019-05-02 20:06:48 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-16 19:59:21 +02:00
|
|
|
-std::string GetProduct() {
|
|
|
|
- return version_info::GetProductNameAndVersionForUserAgent();
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
|
|
|
|
// |allowlist| combines pref/policy + cmdline switch in the browser process.
|
|
|
|
// For renderer and utility (e.g. NetworkService) processes the switch is the
|
2020-07-08 19:23:29 +02:00
|
|
|
@@ -1191,6 +1187,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() {
|
2020-06-09 19:48:00 +02:00
|
|
|
return *greased_brand_version_list;
|
|
|
|
}
|
2019-07-16 19:59:21 +02:00
|
|
|
|
|
|
|
+std::string GetProduct() {
|
2019-05-02 20:06:48 +02:00
|
|
|
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
|
|
|
+ if (command_line->HasSwitch(switches::kProductVersion))
|
|
|
|
+ return command_line->GetSwitchValueASCII(switches::kProductVersion);
|
|
|
|
+
|
2019-07-16 19:59:21 +02:00
|
|
|
+ return version_info::GetProductNameAndVersionForUserAgent();
|
|
|
|
+}
|
|
|
|
+
|
2019-05-02 20:06:48 +02:00
|
|
|
std::string GetUserAgent() {
|
|
|
|
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
|
|
|
if (command_line->HasSwitch(switches::kUserAgent)) {
|
|
|
|
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
|
2020-07-08 19:23:29 +02:00
|
|
|
index dad13f199206..43fbc32b5d83 100644
|
2019-05-02 20:06:48 +02:00
|
|
|
--- chrome/browser/chrome_content_browser_client.h
|
|
|
|
+++ chrome/browser/chrome_content_browser_client.h
|
2020-07-08 19:23:29 +02:00
|
|
|
@@ -91,7 +91,8 @@ class ChromeXrIntegrationClient;
|
2020-04-14 21:31:00 +02:00
|
|
|
}
|
|
|
|
#endif
|
2019-05-02 20:06:48 +02:00
|
|
|
|
|
|
|
-// Returns the user agent of Chrome.
|
|
|
|
+// Returns the product and user agent of Chrome.
|
|
|
|
+std::string GetProduct();
|
|
|
|
std::string GetUserAgent();
|
|
|
|
|
|
|
|
blink::UserAgentMetadata GetUserAgentMetadata();
|