| 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);
|
| }
|
|
|