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); |
Mattias Nissler (ping if slow)
2013/02/06 17:53:33
Yikes, hacks over hacks here. I'll have to think a
Jói
2013/02/07 14:52:32
Yeah, when I ran into this I thought "oops" :) Bu
Mattias Nissler (ping if slow)
2013/02/08 11:26:56
So, I wonder whether we'd be better off if we just
|
registered_preferences_.insert(profile); |
} |
} |