Index: chrome/browser/sync/glue/preference_change_processor.cc |
diff --git a/chrome/browser/sync/glue/preference_change_processor.cc b/chrome/browser/sync/glue/preference_change_processor.cc |
index ec0eeb35b5284930e3654da4dec16e3fe02038ec..874f786d084ac44d76ab1f5ca420e9df2694d7be 100644 |
--- a/chrome/browser/sync/glue/preference_change_processor.cc |
+++ b/chrome/browser/sync/glue/preference_change_processor.cc |
@@ -195,6 +195,7 @@ Value* PreferenceChangeProcessor::ReadPreference( |
void PreferenceChangeProcessor::StartImpl(Profile* profile) { |
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); |
pref_service_ = profile->GetPrefs(); |
+ registrar_.Init(pref_service_); |
StartObserving(); |
} |
@@ -210,7 +211,7 @@ void PreferenceChangeProcessor::StartObserving() { |
for (std::set<std::string>::const_iterator it = |
model_associator_->synced_preferences().begin(); |
it != model_associator_->synced_preferences().end(); ++it) { |
- pref_service_->AddPrefObserver((*it).c_str(), this); |
+ registrar_.Add((*it).c_str(), this); |
} |
} |
@@ -219,7 +220,7 @@ void PreferenceChangeProcessor::StopObserving() { |
for (std::set<std::string>::const_iterator it = |
model_associator_->synced_preferences().begin(); |
it != model_associator_->synced_preferences().end(); ++it) { |
- pref_service_->RemovePrefObserver((*it).c_str(), this); |
+ registrar_.Remove((*it).c_str(), this); |
} |
} |