| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/options/about_page_handler.h" | 5 #include "chrome/browser/ui/webui/options/about_page_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 #endif | 308 #endif |
| 309 } | 309 } |
| 310 | 310 |
| 311 #if defined(OS_CHROMEOS) | 311 #if defined(OS_CHROMEOS) |
| 312 | 312 |
| 313 void AboutPageHandler::CheckNow(const ListValue* args) { | 313 void AboutPageHandler::CheckNow(const ListValue* args) { |
| 314 // Make sure that libcros is loaded and OOBE is complete. | 314 // Make sure that libcros is loaded and OOBE is complete. |
| 315 if (chromeos::CrosLibrary::Get()->EnsureLoaded() && | 315 if (chromeos::CrosLibrary::Get()->EnsureLoaded() && |
| 316 (!WizardController::default_controller() || | 316 (!WizardController::default_controller() || |
| 317 WizardController::IsDeviceRegistered())) { | 317 WizardController::IsDeviceRegistered())) { |
| 318 chromeos::CrosLibrary::Get()->GetUpdateLibrary()->CheckForUpdate(); | 318 chromeos::CrosLibrary::Get()->GetUpdateLibrary()-> |
| 319 RequestUpdateCheck(NULL, // no callback |
| 320 NULL); // no userdata |
| 319 } | 321 } |
| 320 } | 322 } |
| 321 | 323 |
| 322 void AboutPageHandler::RestartNow(const ListValue* args) { | 324 void AboutPageHandler::RestartNow(const ListValue* args) { |
| 323 chromeos::CrosLibrary::Get()->GetPowerLibrary()->RequestRestart(); | 325 chromeos::CrosLibrary::Get()->GetPowerLibrary()->RequestRestart(); |
| 324 } | 326 } |
| 325 | 327 |
| 326 void AboutPageHandler::UpdateStatus( | 328 void AboutPageHandler::UpdateStatus( |
| 327 const chromeos::UpdateLibrary::Status& status) { | 329 const chromeos::UpdateLibrary::Status& status) { |
| 328 string16 message; | 330 string16 message; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 411 |
| 410 void AboutPageHandler::OnOSVersion(chromeos::VersionLoader::Handle handle, | 412 void AboutPageHandler::OnOSVersion(chromeos::VersionLoader::Handle handle, |
| 411 std::string version) { | 413 std::string version) { |
| 412 if (version.size()) { | 414 if (version.size()) { |
| 413 scoped_ptr<Value> version_string(Value::CreateStringValue(version)); | 415 scoped_ptr<Value> version_string(Value::CreateStringValue(version)); |
| 414 web_ui_->CallJavascriptFunction("AboutPage.updateOSVersionCallback", | 416 web_ui_->CallJavascriptFunction("AboutPage.updateOSVersionCallback", |
| 415 *version_string); | 417 *version_string); |
| 416 } | 418 } |
| 417 } | 419 } |
| 418 #endif | 420 #endif |
| OLD | NEW |