| Index: chrome/browser/prefs/pref_value_store.cc
|
| diff --git a/chrome/browser/prefs/pref_value_store.cc b/chrome/browser/prefs/pref_value_store.cc
|
| index 84b6919ec7067db82354d49ea8596d67b7c1a504..987f99871a00d1f5b9adb5435fdd1ca5170dd58d 100644
|
| --- a/chrome/browser/prefs/pref_value_store.cc
|
| +++ b/chrome/browser/prefs/pref_value_store.cc
|
| @@ -56,7 +56,7 @@ PrefValueStore* PrefValueStore::CreatePrefValueStore(
|
| device_management =
|
| ConfigurationPolicyPrefStore::CreateDeviceManagementPolicyPrefStore(
|
| profile);
|
| - extension = new ExtensionPrefStore(profile, PrefNotifier::EXTENSION_STORE);
|
| + extension = new ExtensionPrefStore(profile);
|
| command_line = new CommandLinePrefStore(CommandLine::ForCurrentProcess());
|
| recommended =
|
| ConfigurationPolicyPrefStore::CreateRecommendedPolicyPrefStore();
|
| @@ -148,13 +148,19 @@ bool PrefValueStore::HasPrefPath(const char* path) const {
|
| bool PrefValueStore::PrefHasChanged(const char* path,
|
| PrefNotifier::PrefStoreType new_store) {
|
| DCHECK(new_store != PrefNotifier::INVALID_STORE);
|
| + // If we get a change notification about an unregistered preference,
|
| + // discard it silently because there cannot be any listeners.
|
| + if (pref_types_.find(path) == pref_types_.end())
|
| + return false;
|
| +
|
| // Replying that the pref has changed may cause problems, but it's the safer
|
| // choice.
|
| if (new_store == PrefNotifier::INVALID_STORE)
|
| return true;
|
|
|
| PrefNotifier::PrefStoreType controller = ControllingPrefStoreForPref(path);
|
| - DCHECK(controller != PrefNotifier::INVALID_STORE);
|
| + DCHECK(controller != PrefNotifier::INVALID_STORE)
|
| + << "Invalid controller for path " << path;
|
| if (controller == PrefNotifier::INVALID_STORE)
|
| return true;
|
|
|
|
|