| Index: chrome/browser/ui/webui/version_handler_chromeos.cc
|
| diff --git a/chrome/browser/ui/webui/version_handler_chromeos.cc b/chrome/browser/ui/webui/version_handler_chromeos.cc
|
| index cd9ab7f5e85f50a5c32a702f7cd4eab03570d2de..f61d780d0ea5642c987af0231861a9a82fd3d8ec 100644
|
| --- a/chrome/browser/ui/webui/version_handler_chromeos.cc
|
| +++ b/chrome/browser/ui/webui/version_handler_chromeos.cc
|
| @@ -8,12 +8,9 @@
|
| #include "base/task_scheduler/post_task.h"
|
| #include "content/public/browser/web_ui.h"
|
|
|
| -VersionHandlerChromeOS::VersionHandlerChromeOS()
|
| - : weak_factory_(this) {
|
| -}
|
| +VersionHandlerChromeOS::VersionHandlerChromeOS() : weak_factory_(this) {}
|
|
|
| -VersionHandlerChromeOS::~VersionHandlerChromeOS() {
|
| -}
|
| +VersionHandlerChromeOS::~VersionHandlerChromeOS() {}
|
|
|
| void VersionHandlerChromeOS::HandleRequestVersionInfo(
|
| const base::ListValue* args) {
|
| @@ -28,6 +25,12 @@ void VersionHandlerChromeOS::HandleRequestVersionInfo(
|
| base::PostTaskWithTraitsAndReplyWithResult(
|
| FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
|
| base::TaskPriority::BACKGROUND),
|
| + base::Bind(&chromeos::version_loader::GetFirmware),
|
| + base::Bind(&VersionHandlerChromeOS::OnOSFirmware,
|
| + weak_factory_.GetWeakPtr()));
|
| + base::PostTaskWithTraitsAndReplyWithResult(
|
| + FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
|
| + base::TaskPriority::BACKGROUND),
|
| base::Bind(&chromeos::version_loader::GetARCVersion),
|
| base::Bind(&VersionHandlerChromeOS::OnARCVersion,
|
| weak_factory_.GetWeakPtr()));
|
| @@ -41,6 +44,11 @@ void VersionHandlerChromeOS::OnVersion(const std::string& version) {
|
| web_ui()->CallJavascriptFunctionUnsafe("returnOsVersion", arg);
|
| }
|
|
|
| +void VersionHandlerChromeOS::OnOSFirmware(const std::string& version) {
|
| + base::StringValue arg(version);
|
| + web_ui()->CallJavascriptFunctionUnsafe("returnOsFirmwareVersion", arg);
|
| +}
|
| +
|
| void VersionHandlerChromeOS::OnARCVersion(const std::string& version) {
|
| base::StringValue arg(version);
|
| web_ui()->CallJavascriptFunctionUnsafe("returnARCVersion", arg);
|
|
|