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

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: Respond to review comments. Created 7 years, 11 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 6b85a8b1e0a95f419f3859f995a1d3d343712add..a6127a80f7938524a0ee17bb1520e014b6ad1bf5 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -24,6 +24,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"
@@ -429,26 +430,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;

Powered by Google App Engine
This is Rietveld 408576698