Chromium Code Reviews| 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*/, NULL /*no userdata*/); | |
|
altimofeev
2011/03/10 08:27:34
nit: AFAIK, there is no such comment style. But yo
Nikita (slow)
2011/03/10 11:32:04
Should place each NULL parameter on a separate lin
stevenjb
2011/03/10 17:28:50
Done.
| |
| 319 } | 320 } |
| 320 } | 321 } |
| 321 | 322 |
| 322 void AboutPageHandler::RestartNow(const ListValue* args) { | 323 void AboutPageHandler::RestartNow(const ListValue* args) { |
| 323 chromeos::CrosLibrary::Get()->GetPowerLibrary()->RequestRestart(); | 324 chromeos::CrosLibrary::Get()->GetPowerLibrary()->RequestRestart(); |
| 324 } | 325 } |
| 325 | 326 |
| 326 void AboutPageHandler::UpdateStatus( | 327 void AboutPageHandler::UpdateStatus( |
| 327 const chromeos::UpdateLibrary::Status& status) { | 328 const chromeos::UpdateLibrary::Status& status) { |
| 328 string16 message; | 329 string16 message; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 | 410 |
| 410 void AboutPageHandler::OnOSVersion(chromeos::VersionLoader::Handle handle, | 411 void AboutPageHandler::OnOSVersion(chromeos::VersionLoader::Handle handle, |
| 411 std::string version) { | 412 std::string version) { |
| 412 if (version.size()) { | 413 if (version.size()) { |
| 413 scoped_ptr<Value> version_string(Value::CreateStringValue(version)); | 414 scoped_ptr<Value> version_string(Value::CreateStringValue(version)); |
| 414 web_ui_->CallJavascriptFunction("AboutPage.updateOSVersionCallback", | 415 web_ui_->CallJavascriptFunction("AboutPage.updateOSVersionCallback", |
| 415 *version_string); | 416 *version_string); |
| 416 } | 417 } |
| 417 } | 418 } |
| 418 #endif | 419 #endif |
| OLD | NEW |