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

Unified Diff: chrome/browser/profiles/profile_keyed_base_factory.cc

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. 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/profiles/profile_keyed_base_factory.cc
diff --git a/chrome/browser/profiles/profile_keyed_base_factory.cc b/chrome/browser/profiles/profile_keyed_base_factory.cc
index 1a38c08f2d7a57ef2fcaf34413baddd52ffaf6f8..858cdadf1e0dd1e3fe823e312d16a8fa8888d644 100644
--- a/chrome/browser/profiles/profile_keyed_base_factory.cc
+++ b/chrome/browser/profiles/profile_keyed_base_factory.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/profiles/profile_keyed_base_factory.h"
+#include "chrome/browser/prefs/pref_registry_syncable.h"
+#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
@@ -76,7 +78,13 @@ void ProfileKeyedBaseFactory::RegisterUserPrefsOnProfile(Profile* profile) {
std::set<Profile*>::iterator it = registered_preferences_.find(profile);
if (it == registered_preferences_.end()) {
- RegisterUserPrefs(profile->GetPrefs());
+ PrefService* prefs = profile->GetPrefs();
+ PrefRegistrySyncable* registry = static_cast<PrefRegistrySyncable*>(
+ prefs->DeprecatedGetPrefRegistry());
+ RegisterUserPrefs(registry);
+ // A few registration functions still need the PrefService pointer
+ // (e.g. to clear preferences).
+ DeprecatedRegisterUserPrefs(prefs, registry);
registered_preferences_.insert(profile);
}
}
« no previous file with comments | « chrome/browser/profiles/profile_keyed_base_factory.h ('k') | chrome/browser/search_engines/template_url_prepopulate_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698