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

Unified Diff: chrome/browser/profiles/profile_manager.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: extension service's block_all bit set on Profile reload 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/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 1eceba98853543353e672a8d1e1245fdb9160bc2..4ea4b0a3dd4e9418f1bd4e718a8a57477cc14b9c 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -993,6 +993,7 @@ void ProfileManager::DoFinalInit(Profile* profile, bool go_off_the_record) {
void ProfileManager::DoFinalInitForServices(Profile* profile,
bool go_off_the_record) {
#if defined(ENABLE_EXTENSIONS)
+ ProfileInfoCache& cache = GetProfileInfoCache();
extensions::ExtensionSystem::Get(profile)->InitForRegularProfile(
!go_off_the_record);
// During tests, when |profile| is an instance of TestingProfile,
@@ -1001,6 +1002,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
extensions::ExtensionSystem::Get(profile)->extension_service()->
RegisterContentSettings(profile->GetHostContentSettingsMap());
}
+ // Set the block extensions bit on the ExtensionService. There likely are no
+ // blockable extensions to block.
+ if (!profile->IsGuestSession() &&
+ cache.ProfileIsSigninRequiredAtIndex(
noms (inactive) 2014/11/13 15:24:54 nit: can cache.Profile...( go on the previous line
Mike Lerman 2014/11/13 15:30:05 Done.
+ cache.GetIndexOfProfileWithPath(profile->GetPath()))) {
+ extensions::ExtensionSystem::Get(profile)->extension_service()->
+ BlockAllExtensions();
+ }
+
#endif
#if defined(ENABLE_MANAGED_USERS) && !defined(OS_ANDROID)
// Initialization needs to happen after extension system initialization (for

Powered by Google App Engine
This is Rietveld 408576698