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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/wizard_controller.cc
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index cfc4c16eef11bb9e16dc7cf060ced66947d1f33d..4066f70bd29b2e3a511ec1858548c7d1a7357861 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -39,6 +39,7 @@
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/settings/cros_settings_names.h"
+#include "chrome/browser/prefs/pref_registry_simple.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/options/options_util.h"
@@ -385,27 +386,19 @@ void WizardController::SkipUpdateEnrollAfterEula() {
}
// static
-void WizardController::RegisterPrefs(PrefServiceSimple* local_state) {
- local_state->RegisterBooleanPref(kOobeComplete, false);
- local_state->RegisterIntegerPref(kDeviceRegistered, -1);
- local_state->RegisterBooleanPref(kEulaAccepted, false);
- local_state->RegisterStringPref(kInitialLocale, "en-US");
- // Check if the pref is already registered in case
- // Preferences::RegisterUserPrefs runs before this code in the future.
- if (local_state->FindPreference(prefs::kSpokenFeedbackEnabled) == NULL) {
- local_state->RegisterBooleanPref(prefs::kSpokenFeedbackEnabled, false);
- }
- if (local_state->FindPreference(prefs::kHighContrastEnabled) == NULL) {
- local_state->RegisterBooleanPref(prefs::kHighContrastEnabled, false);
- }
- if (local_state->FindPreference(prefs::kVirtualKeyboardEnabled) == NULL) {
- local_state->RegisterBooleanPref(prefs::kVirtualKeyboardEnabled, false);
- }
- local_state->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false);
- local_state->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true);
- local_state->RegisterBooleanPref(prefs::kFactoryResetRequested, false);
- local_state->RegisterStringPref(prefs::kRLZBrand, std::string());
- local_state->RegisterBooleanPref(prefs::kRLZDisabled, false);
+void WizardController::RegisterPrefs(PrefRegistrySimple* registry) {
+ registry->RegisterBooleanPref(kOobeComplete, false);
+ registry->RegisterIntegerPref(kDeviceRegistered, -1);
+ registry->RegisterBooleanPref(kEulaAccepted, false);
+ registry->RegisterStringPref(kInitialLocale, "en-US");
+ registry->RegisterBooleanPref(prefs::kSpokenFeedbackEnabled, false);
+ registry->RegisterBooleanPref(prefs::kHighContrastEnabled, false);
+ registry->RegisterBooleanPref(prefs::kVirtualKeyboardEnabled, false);
+ registry->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false);
+ registry->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true);
+ registry->RegisterBooleanPref(prefs::kFactoryResetRequested, false);
+ registry->RegisterStringPref(prefs::kRLZBrand, std::string());
+ registry->RegisterBooleanPref(prefs::kRLZDisabled, false);
}
///////////////////////////////////////////////////////////////////////////////
« 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