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

Unified Diff: chrome/browser/background/background_contents_service.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 8 months 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/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 9a30c898eed523d83a14cf505534cd43ba08d6a6..5e79600f3863595dab59e8ea4b7ea1d20a174011 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -70,7 +70,7 @@ using content::SiteInstance;
using content::WebContents;
using extensions::BackgroundInfo;
using extensions::Extension;
-using extensions::UnloadedExtensionInfo;
+using extensions::UnloadedExtensionReason;
namespace {
@@ -509,19 +509,19 @@ void BackgroundContentsService::OnExtensionLoaded(
void BackgroundContentsService::OnExtensionUnloaded(
content::BrowserContext* browser_context,
const extensions::Extension* extension,
- extensions::UnloadedExtensionInfo::Reason reason) {
+ extensions::UnloadedExtensionReason 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_LOCK_ALL: // Fall through.
- case UnloadedExtensionInfo::REASON_MIGRATED_TO_COMPONENT: // Fall through.
- case UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN:
+ case UnloadedExtensionReason::DISABLE: // Fall through.
+ case UnloadedExtensionReason::TERMINATE: // Fall through.
+ case UnloadedExtensionReason::UNINSTALL: // Fall through.
+ case UnloadedExtensionReason::BLACKLIST: // Fall through.
+ case UnloadedExtensionReason::LOCK_ALL: // Fall through.
+ case UnloadedExtensionReason::MIGRATED_TO_COMPONENT: // Fall through.
+ case UnloadedExtensionReason::PROFILE_SHUTDOWN:
ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(extension->id()));
SendChangeNotification(Profile::FromBrowserContext(browser_context));
return;
- case UnloadedExtensionInfo::REASON_UPDATE: {
+ case UnloadedExtensionReason::UPDATE: {
// If there is a manifest specified background page, then shut it down
// here, since if the updated extension still has the background page,
// then it will be loaded from LOADED callback. Otherwise, leave
@@ -533,12 +533,12 @@ void BackgroundContentsService::OnExtensionUnloaded(
base::ASCIIToUTF16(extension->id()));
}
return;
- case UnloadedExtensionInfo::REASON_UNDEFINED:
- // Fall through to undefined case.
- break;
+ case UnloadedExtensionReason::UNDEFINED:
+ // Fall through to undefined case.
+ break;
}
}
- NOTREACHED() << "Undefined case " << reason;
+ NOTREACHED() << "Undefined UnloadedExtensionReason.";
return ShutdownAssociatedBackgroundContents(
base::ASCIIToUTF16(extension->id()));
}
« no previous file with comments | « chrome/browser/background/background_contents_service.h ('k') | chrome/browser/chromeos/accessibility/accessibility_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698