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

Side by Side Diff: chrome/browser/ui/webui/options/about_page_handler.cc

Issue 6648009: Modify UpdateLibrary to use async RequestUpdateCheck call (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698