Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 18055008: Expose "Chrome" as accessible product name. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add dcheck Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index eeedd6124f9a76af73e37754492321845ce80ff4..46ec1161a8c05c4a1c865cf44e00f8fd2471a8b9 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -53,9 +53,9 @@
#include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
#include "chrome/browser/upgrade_detector.h"
#include "chrome/browser/web_applications/web_app.h"
-#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/devtools_agent_host.h"
@@ -964,10 +964,13 @@ void ToggleRequestTabletSite(Browser* browser) {
entry->SetIsOverridingUserAgent(false);
} else {
entry->SetIsOverridingUserAgent(true);
+ chrome::VersionInfo version_info;
+ std::string product;
+ if (version_info.is_valid())
+ product = version_info.ProductNameAndVersionForUserAgent();
current_tab->SetUserAgentOverride(
webkit_glue::BuildUserAgentFromOSAndProduct(
- kOsOverrideForTabletSite,
- ChromeContentClient::GetProductImpl()));
+ kOsOverrideForTabletSite, product));
}
controller.ReloadOriginalRequestURL(true);
}
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698