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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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) 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/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 21 matching lines...) Expand all
32 #include "chrome/browser/chromeos/login/login_utils.h" 32 #include "chrome/browser/chromeos/login/login_utils.h"
33 #include "chrome/browser/chromeos/login/network_screen.h" 33 #include "chrome/browser/chromeos/login/network_screen.h"
34 #include "chrome/browser/chromeos/login/oobe_display.h" 34 #include "chrome/browser/chromeos/login/oobe_display.h"
35 #include "chrome/browser/chromeos/login/registration_screen.h" 35 #include "chrome/browser/chromeos/login/registration_screen.h"
36 #include "chrome/browser/chromeos/login/reset_screen.h" 36 #include "chrome/browser/chromeos/login/reset_screen.h"
37 #include "chrome/browser/chromeos/login/update_screen.h" 37 #include "chrome/browser/chromeos/login/update_screen.h"
38 #include "chrome/browser/chromeos/login/user_image_screen.h" 38 #include "chrome/browser/chromeos/login/user_image_screen.h"
39 #include "chrome/browser/chromeos/login/user_manager.h" 39 #include "chrome/browser/chromeos/login/user_manager.h"
40 #include "chrome/browser/chromeos/settings/cros_settings.h" 40 #include "chrome/browser/chromeos/settings/cros_settings.h"
41 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 41 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
42 #include "chrome/browser/prefs/pref_registry_simple.h"
42 #include "chrome/browser/prefs/pref_service.h" 43 #include "chrome/browser/prefs/pref_service.h"
43 #include "chrome/browser/profiles/profile_manager.h" 44 #include "chrome/browser/profiles/profile_manager.h"
44 #include "chrome/browser/ui/options/options_util.h" 45 #include "chrome/browser/ui/options/options_util.h"
45 #include "chrome/common/chrome_notification_types.h" 46 #include "chrome/common/chrome_notification_types.h"
46 #include "chrome/common/pref_names.h" 47 #include "chrome/common/pref_names.h"
47 #include "content/public/browser/browser_thread.h" 48 #include "content/public/browser/browser_thread.h"
48 #include "content/public/browser/notification_service.h" 49 #include "content/public/browser/notification_service.h"
49 #include "content/public/browser/notification_source.h" 50 #include "content/public/browser/notification_source.h"
50 #include "content/public/browser/notification_types.h" 51 #include "content/public/browser/notification_types.h"
51 #include "ui/base/accelerators/accelerator.h" 52 #include "ui/base/accelerators/accelerator.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 379
379 void WizardController::OnSessionStart() { 380 void WizardController::OnSessionStart() {
380 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart()); 381 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart());
381 } 382 }
382 383
383 void WizardController::SkipUpdateEnrollAfterEula() { 384 void WizardController::SkipUpdateEnrollAfterEula() {
384 skip_update_enroll_after_eula_ = true; 385 skip_update_enroll_after_eula_ = true;
385 } 386 }
386 387
387 // static 388 // static
388 void WizardController::RegisterPrefs(PrefServiceSimple* local_state) { 389 void WizardController::RegisterPrefs(PrefRegistrySimple* registry) {
389 local_state->RegisterBooleanPref(kOobeComplete, false); 390 registry->RegisterBooleanPref(kOobeComplete, false);
390 local_state->RegisterIntegerPref(kDeviceRegistered, -1); 391 registry->RegisterIntegerPref(kDeviceRegistered, -1);
391 local_state->RegisterBooleanPref(kEulaAccepted, false); 392 registry->RegisterBooleanPref(kEulaAccepted, false);
392 local_state->RegisterStringPref(kInitialLocale, "en-US"); 393 registry->RegisterStringPref(kInitialLocale, "en-US");
393 // Check if the pref is already registered in case 394 registry->RegisterBooleanPref(prefs::kSpokenFeedbackEnabled, false);
394 // Preferences::RegisterUserPrefs runs before this code in the future. 395 registry->RegisterBooleanPref(prefs::kHighContrastEnabled, false);
395 if (local_state->FindPreference(prefs::kSpokenFeedbackEnabled) == NULL) { 396 registry->RegisterBooleanPref(prefs::kVirtualKeyboardEnabled, false);
396 local_state->RegisterBooleanPref(prefs::kSpokenFeedbackEnabled, false); 397 registry->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false);
397 } 398 registry->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true);
398 if (local_state->FindPreference(prefs::kHighContrastEnabled) == NULL) { 399 registry->RegisterBooleanPref(prefs::kFactoryResetRequested, false);
399 local_state->RegisterBooleanPref(prefs::kHighContrastEnabled, false); 400 registry->RegisterStringPref(prefs::kRLZBrand, std::string());
400 } 401 registry->RegisterBooleanPref(prefs::kRLZDisabled, false);
401 if (local_state->FindPreference(prefs::kVirtualKeyboardEnabled) == NULL) {
402 local_state->RegisterBooleanPref(prefs::kVirtualKeyboardEnabled, false);
403 }
404 local_state->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false);
405 local_state->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true);
406 local_state->RegisterBooleanPref(prefs::kFactoryResetRequested, false);
407 local_state->RegisterStringPref(prefs::kRLZBrand, std::string());
408 local_state->RegisterBooleanPref(prefs::kRLZDisabled, false);
409 } 402 }
410 403
411 /////////////////////////////////////////////////////////////////////////////// 404 ///////////////////////////////////////////////////////////////////////////////
412 // WizardController, ExitHandlers: 405 // WizardController, ExitHandlers:
413 void WizardController::OnNetworkConnected() { 406 void WizardController::OnNetworkConnected() {
414 if (is_official_build_) { 407 if (is_official_build_) {
415 if (!IsEulaAccepted()) { 408 if (!IsEulaAccepted()) {
416 ShowEulaScreen(); 409 ShowEulaScreen();
417 } else { 410 } else {
418 // Possible cases: 411 // Possible cases:
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 return zero_delay_enabled_; 814 return zero_delay_enabled_;
822 } 815 }
823 816
824 // static 817 // static
825 void WizardController::SetZeroDelays() { 818 void WizardController::SetZeroDelays() {
826 kShowDelayMs = 0; 819 kShowDelayMs = 0;
827 zero_delay_enabled_ = true; 820 zero_delay_enabled_ = true;
828 } 821 }
829 822
830 } // namespace chromeos 823 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/browser/chromeos/power/session_length_limiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698