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

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

Issue 11473019: [cros,rlz] Remove RLZ checkbox from OOBE UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add back old strings Created 8 years 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/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/login/eula_screen.h » ('j') | 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 248 }
249 // Observer will delete itself. 249 // Observer will delete itself.
250 new WizardControllerObserver(wizard_controller, this, reply_message); 250 new WizardControllerObserver(wizard_controller, this, reply_message);
251 wizard_controller->GetNetworkScreen()->OnContinuePressed(); 251 wizard_controller->GetNetworkScreen()->OnContinuePressed();
252 } 252 }
253 253
254 void TestingAutomationProvider::AcceptOOBEEula(DictionaryValue* args, 254 void TestingAutomationProvider::AcceptOOBEEula(DictionaryValue* args,
255 IPC::Message* reply_message) { 255 IPC::Message* reply_message) {
256 bool accepted; 256 bool accepted;
257 bool usage_stats_reporting; 257 bool usage_stats_reporting;
258 bool rlz_enabled;
259 if (!args->GetBoolean("accepted", &accepted) || 258 if (!args->GetBoolean("accepted", &accepted) ||
260 !args->GetBoolean("usage_stats_reporting", &usage_stats_reporting) || 259 !args->GetBoolean("usage_stats_reporting", &usage_stats_reporting)) {
261 !args->GetBoolean("rlz_enabled", &rlz_enabled)) {
262 AutomationJSONReply(this, reply_message).SendError( 260 AutomationJSONReply(this, reply_message).SendError(
263 "Invalid or missing args."); 261 "Invalid or missing args.");
264 return; 262 return;
265 } 263 }
266 264
267 WizardController* wizard_controller = WizardController::default_controller(); 265 WizardController* wizard_controller = WizardController::default_controller();
268 if (!wizard_controller || wizard_controller->current_screen()->GetName() != 266 if (!wizard_controller || wizard_controller->current_screen()->GetName() !=
269 WizardController::kEulaScreenName) { 267 WizardController::kEulaScreenName) {
270 AutomationJSONReply(this, reply_message).SendError( 268 AutomationJSONReply(this, reply_message).SendError(
271 "EULA screen not active."); 269 "EULA screen not active.");
272 return; 270 return;
273 } 271 }
274 // Observer will delete itself. 272 // Observer will delete itself.
275 new WizardControllerObserver(wizard_controller, this, reply_message); 273 new WizardControllerObserver(wizard_controller, this, reply_message);
276 wizard_controller->GetEulaScreen()->OnExit( 274 wizard_controller->GetEulaScreen()->OnExit(accepted, usage_stats_reporting);
277 accepted, usage_stats_reporting, rlz_enabled);
278 } 275 }
279 276
280 void TestingAutomationProvider::CancelOOBEUpdate(DictionaryValue* args, 277 void TestingAutomationProvider::CancelOOBEUpdate(DictionaryValue* args,
281 IPC::Message* reply_message) { 278 IPC::Message* reply_message) {
282 WizardController* wizard_controller = WizardController::default_controller(); 279 WizardController* wizard_controller = WizardController::default_controller();
283 if (wizard_controller && wizard_controller->IsOobeCompleted()) { 280 if (wizard_controller && wizard_controller->IsOobeCompleted()) {
284 // Update already finished. 281 // Update already finished.
285 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); 282 scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
286 return_value->SetString("next_screen", 283 return_value->SetString("next_screen",
287 WizardController::kLoginScreenName); 284 WizardController::kLoginScreenName);
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 1492 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
1496 AddObserver(power_manager_observer_); 1493 AddObserver(power_manager_observer_);
1497 } 1494 }
1498 1495
1499 void TestingAutomationProvider::RemoveChromeosObservers() { 1496 void TestingAutomationProvider::RemoveChromeosObservers() {
1500 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 1497 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
1501 RemoveObserver(power_manager_observer_); 1498 RemoveObserver(power_manager_observer_);
1502 delete power_manager_observer_; 1499 delete power_manager_observer_;
1503 power_manager_observer_ = NULL; 1500 power_manager_observer_ = NULL;
1504 } 1501 }
OLDNEW
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/login/eula_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698