Index: chrome/browser/background_contents_service.cc |
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc |
index df6db030e7d882dd47126185a60f7a64774b60db..dd90c52385b69a61ca31e8d9764f9ad26cb114ab 100644 |
--- a/chrome/browser/background_contents_service.cc |
+++ b/chrome/browser/background_contents_service.cc |
@@ -113,10 +113,21 @@ void BackgroundContentsService::Observe(NotificationType type, |
DCHECK(IsTracked(Details<BackgroundContents>(details).ptr())); |
RegisterBackgroundContents(Details<BackgroundContents>(details).ptr()); |
break; |
- case NotificationType::EXTENSION_UNLOADED: |
- ShutdownAssociatedBackgroundContents( |
- ASCIIToUTF16( |
- Details<UnloadedExtensionInfo>(details)->extension->id())); |
+ case NotificationType::EXTENSION_UNLOADED: |
+ switch (Details<UnloadedExtensionInfo>(details)->reason) { |
+ case UnloadedExtensionInfo::DISABLE: // Intentionally fall through. |
+ case UnloadedExtensionInfo::UNINSTALL: |
+ ShutdownAssociatedBackgroundContents( |
+ ASCIIToUTF16( |
+ Details<UnloadedExtensionInfo>(details)->extension->id())); |
+ break; |
+ case UnloadedExtensionInfo::UPDATE: |
+ // Leave BackgroundContents in place |
+ break; |
+ default: |
+ NOTREACHED(); |
asargent_no_longer_on_chrome
2011/01/15 00:09:53
Would it make sense to shut down the background co
The wrong rickcam account
2011/01/18 20:08:50
Done. I inserted a call to ShutdownAssociatedBack
|
+ break; |
+ } |
break; |
default: |
NOTREACHED(); |