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

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: Compiling is awesome 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 3b87006e1d76365b6d5286d62ce719ca6ab42ba2..c64fe5ad2af47fae562bfe567cea975af7d0a4aa 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;
Andrew T Wilson (Slow) 2014/11/17 16:09:24 Why did this change from break to return?
not at google - send to devlin 2014/11/17 17:04:20 Because I asked Mike to, see below.
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:
Andrew T Wilson (Slow) 2014/11/17 16:09:24 I think this line is mis-indented. Also, no defaul
not at google - send to devlin 2014/11/17 17:04:20 No default case is good for compilation, however y
NOTREACHED();
not at google - send to devlin 2014/11/17 17:04:20 I think there is a bit of miscommunication here -
Mike Lerman 2014/11/19 14:54:34 Done.
ShutdownAssociatedBackgroundContents(base::ASCIIToUTF16(extension->id()));
- break;
+ return;
+ }
}
not at google - send to devlin 2014/11/17 17:04:20 Then here write: NOTREACHED() << "Undefined case
Mike Lerman 2014/11/19 14:54:34 Done.
}

Powered by Google App Engine
This is Rietveld 408576698