Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: chrome/browser/extensions/api/content_settings/content_settings_store.cc

Issue 23694020: Don't clear existing extension-defined preferences and content settings when reloading or updating… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/content_settings/content_settings_store.cc
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_store.cc b/chrome/browser/extensions/api/content_settings/content_settings_store.cc
index 3b0c008cedbbb94f147c92f58bddfc20a11a21a9..f941cd909fddc8333c27a614408e147c1dc48de1 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_store.cc
+++ b/chrome/browser/extensions/api/content_settings/content_settings_store.cc
@@ -123,10 +123,8 @@ void ContentSettingsStore::RegisterExtension(
bool is_enabled) {
base::AutoLock lock(lock_);
ExtensionEntryMap::iterator i = FindEntry(ext_id);
- if (i != entries_.end()) {
- delete i->second;
- entries_.erase(i);
- }
+ if (i != entries_.end())
+ return;
ExtensionEntry* entry = new ExtensionEntry;
entry->id = ext_id;

Powered by Google App Engine
This is Rietveld 408576698