| Index: chrome/browser/extensions/blacklist.h
|
| diff --git a/chrome/browser/extensions/blacklist.h b/chrome/browser/extensions/blacklist.h
|
| index 58b12dbab31fdf098a4e48d76b81e9f40ef6a079..89705a5e7ea4822407590df53fc689541bf17c44 100644
|
| --- a/chrome/browser/extensions/blacklist.h
|
| +++ b/chrome/browser/extensions/blacklist.h
|
| @@ -5,9 +5,11 @@
|
| #ifndef CHROME_BROWSER_EXTENSIONS_BLACKLIST_H_
|
| #define CHROME_BROWSER_EXTENSIONS_BLACKLIST_H_
|
|
|
| +#include <set>
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/callback.h"
|
| #include "base/observer_list.h"
|
|
|
| namespace extensions {
|
| @@ -32,18 +34,19 @@ class Blacklist {
|
| Blacklist* blacklist_;
|
| };
|
|
|
| + typedef base::Callback<void(const std::set<std::string>&)>
|
| + GetBlacklistedIDsCallback;
|
| +
|
| // |prefs_| must outlive this.
|
| explicit Blacklist(ExtensionPrefs* prefs);
|
|
|
| ~Blacklist();
|
|
|
| - // Gets whether an extension is blacklisted.
|
| - //
|
| - // Note that this doesn't entirely determine whether an extension is allowed
|
| - // to be loaded; there are other considerations (e.g. admin settings).
|
| - // See extensions::ManagementPolicy (in particular UserMayLoad).
|
| - bool IsBlacklisted(const std::string& extension_id) const;
|
| - bool IsBlacklisted(const Extension* extension) const;
|
| + // From the set of extension IDs passed in via |ids|, asynchronously checks
|
| + // which are blacklisted and includes them in the resulting set passed
|
| + // via |callback|, which will be sent on the caller's message loop.
|
| + void GetBlacklistedIDs(const std::set<std::string>& ids,
|
| + const GetBlacklistedIDsCallback& callback);
|
|
|
| // Sets the blacklist from the updater to contain the extension IDs in |ids|
|
| void SetFromUpdater(const std::vector<std::string>& ids,
|
| @@ -58,6 +61,8 @@ class Blacklist {
|
|
|
| ExtensionPrefs* const prefs_;
|
|
|
| + std::set<std::string> prefs_blacklist_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Blacklist);
|
| };
|
|
|
|
|