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

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

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 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/user_manager.cc ('k') | chrome/browser/chromeos/preferences.cc » ('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) 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/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 429
430 void WizardController::SkipRegistration() { 430 void WizardController::SkipRegistration() {
431 if (current_screen_ == GetRegistrationScreen()) 431 if (current_screen_ == GetRegistrationScreen())
432 OnRegistrationSkipped(); 432 OnRegistrationSkipped();
433 else 433 else
434 LOG(ERROR) << "Registration screen is not active."; 434 LOG(ERROR) << "Registration screen is not active.";
435 } 435 }
436 436
437 // static 437 // static
438 void WizardController::RegisterPrefs(PrefService* local_state) { 438 void WizardController::RegisterPrefs(PrefService* local_state) {
439 local_state->RegisterBooleanPref(kOobeComplete, false); 439 local_state->RegisterBooleanPref(kOobeComplete,
440 local_state->RegisterIntegerPref(kDeviceRegistered, -1); 440 false,
441 local_state->RegisterBooleanPref(kEulaAccepted, false); 441 PrefService::UNSYNCABLE_PREF);
442 local_state->RegisterStringPref(kInitialLocale, "en-US"); 442 local_state->RegisterIntegerPref(kDeviceRegistered,
443 -1,
444 PrefService::UNSYNCABLE_PREF);
445 local_state->RegisterBooleanPref(kEulaAccepted,
446 false,
447 PrefService::UNSYNCABLE_PREF);
448 local_state->RegisterStringPref(kInitialLocale,
449 "en-US",
450 PrefService::UNSYNCABLE_PREF);
443 // Check if the pref is already registered in case 451 // Check if the pref is already registered in case
444 // Preferences::RegisterUserPrefs runs before this code in the future. 452 // Preferences::RegisterUserPrefs runs before this code in the future.
445 if (local_state->FindPreference(prefs::kAccessibilityEnabled) == NULL) { 453 if (local_state->FindPreference(prefs::kAccessibilityEnabled) == NULL) {
446 local_state->RegisterBooleanPref(prefs::kAccessibilityEnabled, false); 454 local_state->RegisterBooleanPref(prefs::kAccessibilityEnabled,
455 false,
456 PrefService::UNSYNCABLE_PREF);
447 } 457 }
448 } 458 }
449 459
450 /////////////////////////////////////////////////////////////////////////////// 460 ///////////////////////////////////////////////////////////////////////////////
451 // WizardController, ExitHandlers: 461 // WizardController, ExitHandlers:
452 void WizardController::OnNetworkConnected() { 462 void WizardController::OnNetworkConnected() {
453 if (is_official_build_) { 463 if (is_official_build_) {
454 if (!IsEulaAccepted()) { 464 if (!IsEulaAccepted()) {
455 ShowEulaScreen(); 465 ShowEulaScreen();
456 } else { 466 } else {
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 return contents_; 872 return contents_;
863 } 873 }
864 874
865 chromeos::ScreenObserver* WizardController::GetObserver(WizardScreen* screen) { 875 chromeos::ScreenObserver* WizardController::GetObserver(WizardScreen* screen) {
866 return observer_ ? observer_ : this; 876 return observer_ ? observer_ : this;
867 } 877 }
868 878
869 void WizardController::SetZeroDelays() { 879 void WizardController::SetZeroDelays() {
870 kShowDelayMs = 0; 880 kShowDelayMs = 0;
871 } 881 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698