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

Unified Diff: chrome/browser/extensions/extension_info_map.cc

Issue 8496024: Don't close crashed tabs from extensions with background pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix info map Created 9 years, 1 month 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/extension_info_map.cc
diff --git a/chrome/browser/extensions/extension_info_map.cc b/chrome/browser/extensions/extension_info_map.cc
index 01ee98bf4e5a52d3e70d377da404490214dccdb4..c1343aa6d0dbd24299a105e21ed4b5f14e777c00 100644
--- a/chrome/browser/extensions/extension_info_map.cc
+++ b/chrome/browser/extensions/extension_info_map.cc
@@ -65,10 +65,12 @@ void ExtensionInfoMap::RemoveExtension(const std::string& extension_id,
const Extension* extension = extensions_.GetByID(extension_id);
extra_data_.erase(extension_id); // we don't care about disabled extra data
if (extension) {
- if (reason == extension_misc::UNLOAD_REASON_DISABLE)
+ if (reason == extension_misc::UNLOAD_REASON_DISABLE ||
+ reason == extension_misc::UNLOAD_REASON_TERMINATE)
Matt Perry 2011/11/10 22:07:59 nit: pull this condition out into a shared bool li
Yoyo Zhou 2011/11/10 23:26:30 Done.
disabled_extensions_.Insert(extension);
extensions_.Remove(extension_id);
- } else if (reason != extension_misc::UNLOAD_REASON_DISABLE) {
+ } else if (reason != extension_misc::UNLOAD_REASON_DISABLE &&
+ reason != extension_misc::UNLOAD_REASON_TERMINATE) {
// If the extension was uninstalled, make sure it's removed from the map of
// disabled extensions.
disabled_extensions_.Remove(extension_id);

Powered by Google App Engine
This is Rietveld 408576698