| Index: chrome/browser/extensions/extension_settings_storage_cache.cc
|
| diff --git a/chrome/browser/extensions/extension_settings_storage_cache.cc b/chrome/browser/extensions/extension_settings_storage_cache.cc
|
| index f20f068f9b7dfbd1f4bcfa7d65ea74195ef1042a..6137c3139266edc8ee3e35a7690961cef350a9b3 100644
|
| --- a/chrome/browser/extensions/extension_settings_storage_cache.cc
|
| +++ b/chrome/browser/extensions/extension_settings_storage_cache.cc
|
| @@ -15,7 +15,7 @@ ExtensionSettingsStorage::Result ExtensionSettingsStorageCache::Get(
|
| if (GetFromCache(key, &value)) {
|
| DictionaryValue* settings = new DictionaryValue();
|
| settings->SetWithoutPathExpansion(key, value);
|
| - return Result(settings, NULL);
|
| + return Result(settings, NULL, NULL);
|
| }
|
|
|
| Result result = delegate_->Get(key);
|
| @@ -43,7 +43,7 @@ ExtensionSettingsStorage::Result ExtensionSettingsStorageCache::Get(
|
| }
|
|
|
| if (missing_keys.empty()) {
|
| - return Result(from_cache.release(), NULL);
|
| + return Result(from_cache.release(), NULL, NULL);
|
| }
|
|
|
| Result result = delegate_->Get(keys);
|
| @@ -52,8 +52,10 @@ ExtensionSettingsStorage::Result ExtensionSettingsStorageCache::Get(
|
| }
|
|
|
| cache_.MergeDictionary(result.GetSettings());
|
| - result.GetSettings()->MergeDictionary(from_cache.get());
|
| - return result;
|
| +
|
| + DictionaryValue* settings_with_cache = result.GetSettings()->DeepCopy();
|
| + settings_with_cache->MergeDictionary(from_cache.get());
|
| + return Result(settings_with_cache, NULL, NULL);
|
| }
|
|
|
| ExtensionSettingsStorage::Result ExtensionSettingsStorageCache::Get() {
|
| @@ -80,7 +82,7 @@ ExtensionSettingsStorage::Result ExtensionSettingsStorageCache::Set(
|
| return result;
|
| }
|
|
|
| - std::set<std::string>* changed_keys = result.GetChangedKeys();
|
| + const std::set<std::string>* changed_keys = result.GetChangedKeys();
|
| DCHECK(changed_keys);
|
| for (std::set<std::string>::iterator it = changed_keys->begin();
|
| it != changed_keys->end(); ++it) {
|
| @@ -108,7 +110,7 @@ ExtensionSettingsStorage::Result ExtensionSettingsStorageCache::Remove(
|
| return result;
|
| }
|
|
|
| - std::set<std::string>* changed_keys = result.GetChangedKeys();
|
| + const std::set<std::string>* changed_keys = result.GetChangedKeys();
|
| DCHECK(changed_keys);
|
| for (std::set<std::string>::iterator it = changed_keys->begin();
|
| it != changed_keys->end(); ++it) {
|
|
|