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

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

Issue 11415216: Make Blacklist::IsBlacklist asynchronous (it will need to be for safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another test Created 8 years 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
« no previous file with comments | « chrome/browser/extensions/extension_error_ui.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.h
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
index 6adb0156cec8b96cd1721b315c662e1b5aa34534..1908716e44575a068f75bf22b81ccabc3ba33ed8 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -175,6 +175,13 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
Extension::DisableReason disable_reason);
void ClearDisableReasons(const std::string& extension_id);
+ // Gets the set of extensions that have been blacklisted in prefs.
+ std::set<std::string> GetBlacklistedExtensions();
+
+ // Sets whether the extension with |id| is blacklisted.
+ void SetExtensionBlacklisted(const std::string& extension_id,
+ bool is_blacklisted);
+
// Returns the version string for the currently installed extension, or
// the empty string if not found.
std::string GetVersionString(const std::string& extension_id);
@@ -189,11 +196,12 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
// Returns base extensions install directory.
const FilePath& install_directory() const { return install_directory_; }
- // Updates the prefs based on the blacklist.
- void UpdateBlacklist(const std::set<std::string>& blacklist_set);
-
- // Returns whether the extension with |id| is blacklisted.
- // You probably don't want to call this method, see Blacklist::IsBlacklisted.
+ // Returns whether the extension with |id| has its blacklist bit set.
+ //
+ // WARNING: this only checks the extension's entry in prefs, so by definition
+ // can only check extensions that prefs knows about. There may be other
+ // sources of blacklist information, such as safebrowsing. You probably want
+ // to use Blacklist::GetBlacklistedIDs rather than this method.
bool IsExtensionBlacklisted(const std::string& id) const;
// Based on extension id, checks prefs to see if it is orphaned.
@@ -495,7 +503,8 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
URLPatternSet GetAllowedInstallSites();
private:
- friend class ExtensionPrefsUninstallExtension; // Unit test.
+ friend class ExtensionPrefsBlacklistedExtensions; // Unit test.
+ friend class ExtensionPrefsUninstallExtension; // Unit test.
// See the Create methods.
ExtensionPrefs(PrefService* prefs,
« no previous file with comments | « chrome/browser/extensions/extension_error_ui.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698