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..38e3e9a95968a500426e340e0ce2c8327dc1394c 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 background content in place |
Andrew T Wilson (Slow)
2011/01/14 01:41:34
nit: should be "BackgroundContents" not "backgroun
The wrong rickcam account
2011/01/14 02:13:36
Done.
|
+ break; |
+ default: |
+ NOTREACHED(); |
+ break; |
+ } |
break; |
default: |
NOTREACHED(); |