From cf516a30ceadae186272d8442a3ee195c25ace87 Mon Sep 17 00:00:00 2001 From: dbeam Date: Fri, 19 Sep 2014 17:40:41 -0700 Subject: [PATCH] help: remove hash+ref+position from chrome://help page. R=michaelpg@chromium.org BUG=416133 Review URL: https://codereview.chromium.org/583193007 Cr-Commit-Position: refs/heads/master@{#295834} --- chrome/browser/resources/help/help_content.html | 2 +- chrome/browser/ui/webui/help/help_handler.cc | 41 +++++++++---------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/chrome/browser/resources/help/help_content.html b/chrome/browser/resources/help/help_content.html index 5fc96ebd27b0..9c72a3f01758 100644 --- a/chrome/browser/resources/help/help_content.html +++ b/chrome/browser/resources/help/help_content.html @@ -13,7 +13,7 @@
-
+
  diff --git a/chrome/browser/ui/webui/help/help_handler.cc b/chrome/browser/ui/webui/help/help_handler.cc index 1b8ed431d232..603e2b764ae7 100644 --- a/chrome/browser/ui/webui/help/help_handler.cc +++ b/chrome/browser/ui/webui/help/help_handler.cc @@ -112,26 +112,6 @@ bool CanChangeChannel() { #endif // defined(OS_CHROMEOS) -base::string16 BrowserVersionString(bool long_html) { - chrome::VersionInfo version_info; - DCHECK(version_info.is_valid()); - - std::string version = version_info.Version(); - - std::string modifier = chrome::VersionInfo::GetVersionStringModifier(); - if (!modifier.empty()) - version += " " + modifier; - -#if defined(ARCH_CPU_64_BITS) - version += " (64-bit)"; -#endif - - if (long_html) - version += "
(" + version_info.LastChange() + ")"; - - return base::UTF8ToUTF16(version); -} - } // namespace HelpHandler::HelpHandler() @@ -234,11 +214,7 @@ void HelpHandler::GetLocalizedValues(base::DictionaryValue* localized_strings) { localized_strings->SetString( "browserVersion", l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, - BrowserVersionString(false))); - localized_strings->SetString( - "browserVersionLongHtml", - l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, - BrowserVersionString(true))); + BuildBrowserVersionString())); base::Time::Exploded exploded_time; base::Time::Now().LocalExplode(&exploded_time); @@ -335,7 +311,20 @@ void HelpHandler::Observe(int type, const content::NotificationSource& source, // static base::string16 HelpHandler::BuildBrowserVersionString() { - return BrowserVersionString(false); + chrome::VersionInfo version_info; + DCHECK(version_info.is_valid()); + + std::string version = version_info.Version(); + + std::string modifier = chrome::VersionInfo::GetVersionStringModifier(); + if (!modifier.empty()) + version += " " + modifier; + +#if defined(ARCH_CPU_64_BITS) + version += " (64-bit)"; +#endif + + return base::UTF8ToUTF16(version); } void HelpHandler::OnPageLoaded(const base::ListValue* args) { -- 2.11.4.GIT