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

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

Issue 1905113002: Add ARC version to help and version pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 8 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/ui/webui/help/help_handler.h ('k') | chrome/browser/ui/webui/version_handler_chromeos.h » ('j') | 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 115d923f0a313319309d276d0edfccc4bad56c46..0db3e352833b9aa450535110bde2b0238eb3ba2d 100644
--- a/chrome/browser/ui/webui/help/help_handler.cc
+++ b/chrome/browser/ui/webui/help/help_handler.cc
@@ -253,6 +253,7 @@ void HelpHandler::GetLocalizedValues(base::DictionaryValue* localized_strings) {
{"reportAnIssue", IDS_REPORT_AN_ISSUE},
#if defined(OS_CHROMEOS)
{"platform", IDS_PLATFORM_LABEL},
+ {"arcVersion", IDS_ARC_VERSION_LABEL},
{"firmware", IDS_ABOUT_PAGE_FIRMWARE},
{"showMoreInfo", IDS_SHOW_MORE_INFO},
{"hideMoreInfo", IDS_HIDE_MORE_INFO},
@@ -476,6 +477,12 @@ void HelpHandler::OnPageLoaded(const base::ListValue* args) {
base::PostTaskAndReplyWithResult(
content::BrowserThread::GetBlockingPool(),
FROM_HERE,
+ base::Bind(&chromeos::version_loader::GetARCVersion),
+ base::Bind(&HelpHandler::OnARCVersion,
+ weak_factory_.GetWeakPtr()));
+ base::PostTaskAndReplyWithResult(
+ content::BrowserThread::GetBlockingPool(),
+ FROM_HERE,
base::Bind(&chromeos::version_loader::GetFirmware),
base::Bind(&HelpHandler::OnOSFirmware,
weak_factory_.GetWeakPtr()));
@@ -690,6 +697,11 @@ void HelpHandler::OnOSVersion(const std::string& version) {
base::StringValue(version));
}
+void HelpHandler::OnARCVersion(const std::string& firmware) {
+ web_ui()->CallJavascriptFunction("help.HelpPage.setARCVersion",
+ base::StringValue(firmware));
+}
+
void HelpHandler::OnOSFirmware(const std::string& firmware) {
web_ui()->CallJavascriptFunction("help.HelpPage.setOSFirmware",
base::StringValue(firmware));
« no previous file with comments | « chrome/browser/ui/webui/help/help_handler.h ('k') | chrome/browser/ui/webui/version_handler_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698