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

Unified Diff: chrome/browser/extensions/extension_service.h

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/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 556adb0025afdec9c42b162005a9cf4879179df8..0a338d31171c22c5ba2fb55416afc636c8915178 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -295,6 +295,15 @@ class ExtensionService
// |was_installed_by_default| flag.
void DisableUserExtensions(const std::vector<std::string>& except_ids);
+ // Extensions that are not locked, components or forced by policy should be
+ // locked. Extensions are no longer considered enabled, disabled or
+ // terminated. Blacklisted extensions are now considered both blacklisted and
+ // blocked.
not at google - send to devlin 2014/11/12 23:41:43 Comment should explain what this method is suppose
Mike Lerman 2014/11/13 15:30:05 Done, although I've never been an Oxford Comma man
+ void BlockAllExtensions();
+
+ // All blocked extensions should revert to being either enabled, disabled or
+ // terminated as appropriate.
+ void UnblockAllBlockedExtensions();
not at google - send to devlin 2014/11/12 23:41:43 I think just "UnblockAllExtensions" is fine. And y
Mike Lerman 2014/11/13 15:30:05 Done.
// Updates the |extension|'s granted permissions lists to include all
// permissions in the |extension|'s manifest and re-enables the
// extension.
@@ -551,6 +560,9 @@ class ExtensionService
// (or upgraded) extension.
bool ShouldEnableOnInstall(const extensions::Extension* extension);
+ // Helper method to determine if an extension can be blocked.
+ bool CanBlockExtension(const extensions::Extension* extension);
+
// Helper to determine if updating an extensions should proceed immediately,
// or if we should delay the update until further notice.
bool ShouldDelayExtensionUpdate(const std::string& extension_id,
@@ -689,6 +701,9 @@ class ExtensionService
// first time.
bool is_first_run_;
+ // Set to true if extensions are all to be blocked.
+ bool block_extensions_;
+
// Store the ids of reloading extensions. We use this to re-enable extensions
// which were disabled for a reload.
std::set<std::string> reloading_extensions_;

Powered by Google App Engine
This is Rietveld 408576698