| 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..84fca87ad8156653c697e1ee3b74e9fc3bbbb0c4 100644
|
| --- a/chrome/browser/background_contents_service.cc
|
| +++ b/chrome/browser/background_contents_service.cc
|
| @@ -113,10 +113,24 @@ 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();
|
| + ShutdownAssociatedBackgroundContents(
|
| + ASCIIToUTF16(
|
| + Details<UnloadedExtensionInfo>(details)->extension->id()));
|
| + break;
|
| + }
|
| break;
|
| default:
|
| NOTREACHED();
|
|
|