Chromium Code Reviews| Index: chrome/browser/background/background_contents_service.cc |
| diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc |
| index 3b87006e1d76365b6d5286d62ce719ca6ab42ba2..e8a34e0e9f0c84ee61d2f9f6ca590984cfbc67aa 100644 |
| --- a/chrome/browser/background/background_contents_service.cc |
| +++ b/chrome/browser/background/background_contents_service.cc |
| @@ -454,14 +454,15 @@ void BackgroundContentsService::OnExtensionUnloaded( |
| const extensions::Extension* extension, |
| extensions::UnloadedExtensionInfo::Reason reason) { |
| switch (reason) { |
| - case UnloadedExtensionInfo::REASON_DISABLE: // Fall through. |
| - case UnloadedExtensionInfo::REASON_TERMINATE: // Fall through. |
| - case UnloadedExtensionInfo::REASON_UNINSTALL: // Fall through. |
| - case UnloadedExtensionInfo::REASON_BLACKLIST: // Fall through. |
| + case UnloadedExtensionInfo::REASON_DISABLE: // Fall through. |
| + case UnloadedExtensionInfo::REASON_TERMINATE: // Fall through. |
| + case UnloadedExtensionInfo::REASON_UNINSTALL: // Fall through. |
| + case UnloadedExtensionInfo::REASON_BLACKLIST: // Fall through. |
| + case UnloadedExtensionInfo::REASON_LOCK_ALL: // Fall through. |
| case UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN: |
| ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(extension->id())); |
| SendChangeNotification(Profile::FromBrowserContext(browser_context)); |
| - break; |
| + return; |
| case UnloadedExtensionInfo::REASON_UPDATE: { |
| // If there is a manifest specified background page, then shut it down |
| // here, since if the updated extension still has the background page, |
| @@ -473,12 +474,12 @@ void BackgroundContentsService::OnExtensionUnloaded( |
| ShutdownAssociatedBackgroundContents( |
| base::ASCIIToUTF16(extension->id())); |
| } |
| - break; |
| - } |
| - default: |
| + return; |
| + case UnloadedExtensionInfo::REASON_UNDEFINED: |
|
not at google - send to devlin
2014/11/12 23:41:43
Ugh, this UNDEFINED value only exists in a single
Mike Lerman
2014/11/13 15:30:04
Should we remove REASON_UNDEFINED from the enum an
|
| NOTREACHED(); |
| ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(extension->id())); |
| - break; |
| + return; |
| + } |
| } |
| } |