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

Unified Diff: chrome/browser/first_run/first_run.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/first_run/first_run.cc
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index aa2dd46f615593748c1d20e99e2850ce6eff3517..f4a8386941cfdbb97588bd062294822e542fda98 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/importer/importer_list.h"
#include "chrome/browser/importer/importer_progress_dialog.h"
#include "chrome/browser/importer/importer_progress_observer.h"
+#include "chrome/browser/prefs/pref_registry_simple.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -435,26 +436,29 @@ bool SetShowFirstRunBubblePref(FirstRunBubbleOptions show_bubble_option) {
}
bool SetShowWelcomePagePref() {
- PrefServiceSimple* local_state = g_browser_process->local_state();
+ PrefService* 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);
+ static_cast<PrefRegistrySimple*>(
+ local_state->DeprecatedGetPrefRegistry())->RegisterBooleanPref(
+ prefs::kShouldShowWelcomePage, false);
local_state->SetBoolean(prefs::kShouldShowWelcomePage, true);
}
return true;
}
bool SetPersonalDataManagerFirstRunPref() {
- PrefServiceSimple* local_state = g_browser_process->local_state();
+ PrefService* 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);
+ static_cast<PrefRegistrySimple*>(
+ local_state->DeprecatedGetPrefRegistry())->RegisterBooleanPref(
+ prefs::kAutofillPersonalDataManagerFirstRun, false);
local_state->SetBoolean(prefs::kAutofillPersonalDataManagerFirstRun, true);
}
return true;
« no previous file with comments | « chrome/browser/external_protocol/external_protocol_handler.cc ('k') | chrome/browser/geolocation/chrome_access_token_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698