Return Chrome 'Browser' value for DevTools remote debugging (issue #2300)

This commit is contained in:
Marshall Greenblatt
2018-01-04 18:52:30 -05:00
parent 50ca6928c3
commit 232f6bc427
4 changed files with 38 additions and 0 deletions

View File

@@ -235,6 +235,10 @@ std::string CefContentClient::GetProduct() const {
if (command_line->HasSwitch(switches::kProductVersion))
return command_line->GetSwitchValueASCII(switches::kProductVersion);
return GetChromeProduct();
}
std::string CefContentClient::GetChromeProduct() const {
return base::StringPrintf("Chrome/%d.%d.%d.%d", CHROME_VERSION_MAJOR,
CHROME_VERSION_MINOR, CHROME_VERSION_BUILD,
CHROME_VERSION_PATCH);

View File

@@ -35,6 +35,7 @@ class CefContentClient : public content::ContentClient,
std::vector<content::PepperPluginInfo>* plugins) override;
void AddAdditionalSchemes(Schemes* schemes) override;
std::string GetProduct() const override;
std::string GetChromeProduct() const override;
std::string GetUserAgent() const override;
base::string16 GetLocalizedString(int message_id) const override;
base::StringPiece GetDataResource(