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

Unified Diff: chrome/browser/ui/webui/help/help_handler.cc

Issue 583193007: help: remove hash+ref+position from chrome://help page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just remove from all builds Created 6 years, 3 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 | « chrome/browser/resources/help/help_content.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/help/help_handler.cc
diff --git a/chrome/browser/ui/webui/help/help_handler.cc b/chrome/browser/ui/webui/help/help_handler.cc
index 1b8ed431d23229beec7fc4810dade434d8c89fb3..603e2b764ae751b1790f56f2e975da1c3dd58e81 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 += "<br>(" + 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) {
« no previous file with comments | « chrome/browser/resources/help/help_content.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698