Chromium Code Reviews| 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 537aa6adbb466abb0f9c2b97339ab9b39a6fbad4..95bd8121503af9121d852f6c13d44cc7009ee75c 100644 |
| --- a/chrome/browser/prefs/pref_value_store.cc |
| +++ b/chrome/browser/prefs/pref_value_store.cc |
| @@ -5,10 +5,9 @@ |
| #include "chrome/browser/prefs/pref_value_store.h" |
| #include "chrome/browser/browser_thread.h" |
| -#include "chrome/browser/extensions/extension_pref_store.h" |
| #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| #include "chrome/browser/prefs/command_line_pref_store.h" |
| -#include "chrome/browser/prefs/default_pref_store.h" |
| +#include "chrome/browser/prefs/in_memory_pref_store.h" |
| #include "chrome/common/json_pref_store.h" |
| #include "chrome/common/notification_service.h" |
| @@ -41,21 +40,21 @@ PrefValueStore* PrefValueStore::CreatePrefValueStore( |
| using policy::ConfigurationPolicyPrefStore; |
| ConfigurationPolicyPrefStore* managed = NULL; |
| ConfigurationPolicyPrefStore* device_management = NULL; |
| - ExtensionPrefStore* extension = NULL; |
| + InMemoryPrefStore* extension = NULL; |
| CommandLinePrefStore* command_line = NULL; |
| ConfigurationPolicyPrefStore* recommended = NULL; |
| JsonPrefStore* user = new JsonPrefStore( |
| pref_filename, |
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
| - DefaultPrefStore* default_store = new DefaultPrefStore(); |
| + InMemoryPrefStore* default_store = new InMemoryPrefStore(); |
| if (!user_only) { |
| managed = |
| ConfigurationPolicyPrefStore::CreateManagedPlatformPolicyPrefStore(); |
| device_management = |
| ConfigurationPolicyPrefStore::CreateDeviceManagementPolicyPrefStore(); |
| - extension = new ExtensionPrefStore(profile, PrefNotifier::EXTENSION_STORE); |
| + extension = new InMemoryPrefStore; |
|
Mattias Nissler (ping if slow)
2010/11/19 10:47:40
This one has no parens, but the one above has. The
battre (please use the other)
2010/11/19 16:03:18
Done.
|
| command_line = new CommandLinePrefStore(CommandLine::ForCurrentProcess()); |
| recommended = |
| ConfigurationPolicyPrefStore::CreateRecommendedPolicyPrefStore(); |
| @@ -152,7 +151,8 @@ bool PrefValueStore::PrefHasChanged(const char* path, |
| 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; |
| @@ -460,6 +460,14 @@ bool PrefValueStore::HasPolicyConflictingUserProxySettings() { |
| return false; |
| } |
| +void PrefValueStore::ReplaceExtensionPrefStore(PrefStore* extension_prefs) { |
| + pref_stores_[PrefNotifier::EXTENSION_STORE].reset(extension_prefs); |
| +} |
| + |
| +PrefStore* PrefValueStore::GetExtensionPrefStore() { |
| + return pref_stores_[PrefNotifier::EXTENSION_STORE].get(); |
| +} |
| + |
| PrefValueStore::PrefValueStore(PrefStore* managed_platform_prefs, |
| PrefStore* device_management_prefs, |
| PrefStore* extension_prefs, |