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

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

Issue 98463005: Enable/disable extensions upon changes in blacklist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added UI, store blacklist state in prefs, +2 unittests. Created 6 years, 11 months 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_prefs.h
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
index cc8d5102e0d5905ddc311e7b4ff256a23d46bd68..922e3c72a69368daea4d3452b1f4b69a41d8e81f 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -14,6 +14,7 @@
#include "base/prefs/scoped_user_pref_update.h"
#include "base/time/time.h"
#include "base/values.h"
+#include "chrome/browser/extensions/blacklist_state.h"
#include "chrome/browser/extensions/extension_scoped_prefs.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "extensions/browser/app_sorting.h"
@@ -190,6 +191,16 @@ class ExtensionPrefs : public ExtensionScopedPrefs,
// Called to change the extension's state when it is enabled/disabled.
void SetExtensionState(const std::string& extension_id, Extension::State);
+ // Called to change the extension's BlacklistState. Currently only used for
+ // non-malicious extensions.
+ // TODO(oleg): replace SetExtensionBlacklisted by this function.
+ void SetExtensionBlacklistState(const std::string& extension_id,
+ BlacklistState state);
+
+ // Checks whether |extension_id| is marked as greylisted.
+ // TODO(oleg): Replace IsExtensionBlacklisted by this method.
+ BlacklistState GetExtensionBlacklistState(const std::string& extension_id);
+
// Populates |out| with the ids of all installed extensions.
void GetExtensions(ExtensionIdList* out);
@@ -241,7 +252,10 @@ class ExtensionPrefs : public ExtensionScopedPrefs,
Extension::DisableReason disable_reason);
void ClearDisableReasons(const std::string& extension_id);
- // Gets the set of extensions that have been blacklisted in prefs.
+ // Gets the set of extensions that have been blacklisted in prefs. This will
+ // return only the blocked extensions, not the "greylist" extensions.
+ // TODO(oleg): Make method names consistent here, in extension service and in
+ // blacklist.
std::set<std::string> GetBlacklistedExtensions();
// Sets whether the extension with |id| is blacklisted.
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | chrome/browser/extensions/extension_prefs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698