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

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

Issue 695133005: Temporarily disable extensions and sync while a profile is locked - Profiles Approach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 5f8a3e8fc7d68cf7563cafa47b992e162012817a..338a0768d9488af065e6f15dfb0e417a06a48ea9 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -458,10 +458,11 @@ void BackgroundContentsService::OnExtensionUnloaded(
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,13 +474,15 @@ void BackgroundContentsService::OnExtensionUnloaded(
ShutdownAssociatedBackgroundContents(
base::ASCIIToUTF16(extension->id()));
}
+ return;
+ case UnloadedExtensionInfo::REASON_UNDEFINED:
+ // Fall through to undefined case.
break;
}
- default:
- NOTREACHED();
- ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(extension->id()));
- break;
}
+ NOTREACHED() << "Undefined case " << reason;
+ return ShutdownAssociatedBackgroundContents(
+ base::ASCIIToUTF16(extension->id()));
}
void BackgroundContentsService::OnExtensionUninstalled(

Powered by Google App Engine
This is Rietveld 408576698