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

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: Fix nits 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
« no previous file with comments | « chrome/browser/chromeos/login/update_screen_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/update_screen_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698