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

Unified Diff: chrome/browser/first_run/first_run.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/first_run/first_run.cc
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 8ce4f47c52c09ddc0783adae8c59f1bfcfb02a02..1c8d3d75e006400845541aeec0f736bfd8077536 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -511,10 +511,10 @@ std::string GetPingDelayPrefName() {
installer::master_preferences::kDistroPingDelay);
}
-void RegisterUserPrefs(PrefService* prefs) {
+void RegisterUserPrefs(PrefServiceSyncable* prefs) {
prefs->RegisterIntegerPref(GetPingDelayPrefName().c_str(),
0,
- PrefService::UNSYNCABLE_PREF);
+ PrefServiceSyncable::UNSYNCABLE_PREF);
}
bool RemoveSentinel() {
@@ -533,9 +533,10 @@ bool SetShowFirstRunBubblePref(bool show_bubble) {
}
bool SetShowWelcomePagePref() {
- PrefService* local_state = g_browser_process->local_state();
+ PrefServiceSimple* local_state = g_browser_process->local_state();
if (!local_state)
return false;
+ // TODO(joi): This should happen via browser_prefs::RegisterLocalState().
if (!local_state->FindPreference(prefs::kShouldShowWelcomePage)) {
local_state->RegisterBooleanPref(prefs::kShouldShowWelcomePage, false);
local_state->SetBoolean(prefs::kShouldShowWelcomePage, true);
@@ -544,11 +545,12 @@ bool SetShowWelcomePagePref() {
}
bool SetPersonalDataManagerFirstRunPref() {
- PrefService* local_state = g_browser_process->local_state();
+ PrefServiceSimple* local_state = g_browser_process->local_state();
if (!local_state)
return false;
if (!local_state->FindPreference(
prefs::kAutofillPersonalDataManagerFirstRun)) {
+ // TODO(joi): This should happen via browser_prefs::RegisterLocalState().
local_state->RegisterBooleanPref(
prefs::kAutofillPersonalDataManagerFirstRun, false);
local_state->SetBoolean(prefs::kAutofillPersonalDataManagerFirstRun, true);

Powered by Google App Engine
This is Rietveld 408576698