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

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: mpcomplete's 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..d3210a6f08346a4e77dd9b8c35db2d8f1f36c67c 100644
--- a/chrome/browser/extensions/extension_info_map.cc
+++ b/chrome/browser/extensions/extension_info_map.cc
@@ -64,11 +64,13 @@ void ExtensionInfoMap::RemoveExtension(const std::string& extension_id,
CheckOnValidThread();
const Extension* extension = extensions_.GetByID(extension_id);
extra_data_.erase(extension_id); // we don't care about disabled extra data
+ bool was_uninstalled = (reason != extension_misc::UNLOAD_REASON_DISABLE &&
+ reason != extension_misc::UNLOAD_REASON_TERMINATE);
if (extension) {
- if (reason == extension_misc::UNLOAD_REASON_DISABLE)
+ if (!was_uninstalled)
disabled_extensions_.Insert(extension);
extensions_.Remove(extension_id);
- } else if (reason != extension_misc::UNLOAD_REASON_DISABLE) {
+ } else if (was_uninstalled) {
// If the extension was uninstalled, make sure it's removed from the map of
// disabled extensions.
disabled_extensions_.Remove(extension_id);
« no previous file with comments | « chrome/browser/extensions/extension_crash_recovery_browsertest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698