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

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..62c624e34a5c4f62b72ca64d495a39220c9c3cdb 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,20 @@ 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::REASON_DISABLE: // Fall through.
+ case UnloadedExtensionReason::REASON_TERMINATE: // Fall through.
+ case UnloadedExtensionReason::REASON_UNINSTALL: // Fall through.
+ case UnloadedExtensionReason::REASON_BLACKLIST: // Fall through.
+ case UnloadedExtensionReason::REASON_LOCK_ALL: // Fall through.
+ case UnloadedExtensionReason::REASON_MIGRATED_TO_COMPONENT: // Fall
+ // through.
+ case UnloadedExtensionReason::REASON_PROFILE_SHUTDOWN:
ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(extension->id()));
SendChangeNotification(Profile::FromBrowserContext(browser_context));
return;
- case UnloadedExtensionInfo::REASON_UPDATE: {
+ case UnloadedExtensionReason::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,
// then it will be loaded from LOADED callback. Otherwise, leave
@@ -533,9 +534,9 @@ void BackgroundContentsService::OnExtensionUnloaded(
base::ASCIIToUTF16(extension->id()));
}
return;
- case UnloadedExtensionInfo::REASON_UNDEFINED:
- // Fall through to undefined case.
- break;
+ case UnloadedExtensionReason::REASON_UNDEFINED:
+ // Fall through to undefined case.
+ break;
}
}
NOTREACHED() << "Undefined case " << reason;

Powered by Google App Engine
This is Rietveld 408576698