Index: chrome/browser/extensions/extension_service.h |
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h |
index a388b98a7bfc8fcdc128d159be897f381503e628..19aebc80f9330c350a6e9324a84932a545f4853e 100644 |
--- a/chrome/browser/extensions/extension_service.h |
+++ b/chrome/browser/extensions/extension_service.h |
@@ -633,6 +633,9 @@ class ExtensionService |
}; |
typedef std::map<std::string, ExtensionRuntimeData> ExtensionRuntimeDataMap; |
+ // Populates greylist_. |
+ void LoadGreylistFromPrefs(); |
+ |
// Signals *ready_ and sends a notification to the listeners. |
void SetReadyAndNotifyListeners(); |
@@ -700,7 +703,16 @@ class ExtensionService |
// Manages the blacklisted extensions, intended as callback from |
// Blacklist::GetBlacklistedIDs. |
- void ManageBlacklist(const std::set<std::string>& blacklisted_ids); |
+ void ManageBlacklist( |
+ const extensions::Blacklist::BlacklistStateMap& blacklisted_ids); |
+ |
+ // Add extensions in |malware| to blacklisted_extensions, remove extensions |
not at google - send to devlin
2014/01/22 00:33:14
s/malware/blocked? or s/blocked/malware?
Oleg Eterevsky
2014/01/22 21:25:04
Done.
|
+ // that are neither in |malware|, nor in |unknown|. |
+ void UpdateBlockedExtensions(const std::set<std::string>& blocked, |
+ const std::set<std::string>& unknown); |
+ |
+ void UpdateGreylistedExtensions(const std::set<std::string>& greylist, |
+ const std::set<std::string>& unknown); |
// Controls if installs are delayed. See comment for |
// |installs_delayed_for_gc_|. |
@@ -733,6 +745,14 @@ class ExtensionService |
// Sets of enabled/disabled/terminated/blacklisted extensions. Not owned. |
extensions::ExtensionRegistry* registry_; |
+ // Set of greylisted extensions. These extensions are disabled if they are |
+ // already installed in Chromium at the time when they are added to |
+ // the greylist. Unlike blacklisted extensions, greylisted ones are visible |
+ // to the user and if user re-enables such an extension, they remain enabled. |
+ // |
+ // These extensions should appear in registry_. |
+ extensions::ExtensionSet greylist_; |
+ |
// The list of extension installs delayed for various reasons. The reason |
// for delayed install is stored in ExtensionPrefs. These are not part of |
// ExtensionRegistry because they are not yet installed. |