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

Side by Side Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 10821031: [cros] pyauto.CancelOOBEUpdate always returns a non-empty dict with 'next_screen'. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/automation/testing_automation_provider.h ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 } 277 }
278 // Observer will delete itself. 278 // Observer will delete itself.
279 new WizardControllerObserver(wizard_controller, this, reply_message); 279 new WizardControllerObserver(wizard_controller, this, reply_message);
280 wizard_controller->GetEulaScreen()->OnExit(accepted, usage_stats_reporting); 280 wizard_controller->GetEulaScreen()->OnExit(accepted, usage_stats_reporting);
281 } 281 }
282 282
283 void TestingAutomationProvider::CancelOOBEUpdate(DictionaryValue* args, 283 void TestingAutomationProvider::CancelOOBEUpdate(DictionaryValue* args,
284 IPC::Message* reply_message) { 284 IPC::Message* reply_message) {
285 WizardController* wizard_controller = WizardController::default_controller(); 285 WizardController* wizard_controller = WizardController::default_controller();
286 if (wizard_controller && wizard_controller->IsOobeCompleted()) { 286 if (wizard_controller && wizard_controller->IsOobeCompleted()) {
287 AutomationJSONReply(this, reply_message).SendSuccess(NULL); 287 // Update already finished.
288 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
289 return_value->SetString("next_screen",
290 WizardController::kLoginScreenName);
291 AutomationJSONReply(this, reply_message).SendSuccess(return_value.get());
288 return; 292 return;
289 } 293 }
290 if (!wizard_controller || wizard_controller->current_screen()->GetName() != 294 if (!wizard_controller || wizard_controller->current_screen()->GetName() !=
291 WizardController::kUpdateScreenName) { 295 WizardController::kUpdateScreenName) {
292 AutomationJSONReply(this, reply_message).SendError( 296 AutomationJSONReply(this, reply_message).SendError(
293 "Update screen not active."); 297 "Update screen not active.");
294 return; 298 return;
295 } 299 }
296 // Observer will delete itself. 300 // Observer will delete itself.
297 new WizardControllerObserver(wizard_controller, this, reply_message); 301 new WizardControllerObserver(wizard_controller, this, reply_message);
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 1459 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
1456 AddObserver(power_manager_observer_); 1460 AddObserver(power_manager_observer_);
1457 } 1461 }
1458 1462
1459 void TestingAutomationProvider::RemoveChromeosObservers() { 1463 void TestingAutomationProvider::RemoveChromeosObservers() {
1460 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 1464 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
1461 RemoveObserver(power_manager_observer_); 1465 RemoveObserver(power_manager_observer_);
1462 delete power_manager_observer_; 1466 delete power_manager_observer_;
1463 power_manager_observer_ = NULL; 1467 power_manager_observer_ = NULL;
1464 } 1468 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698