Chromium Code Reviews| Index: chrome/browser/extensions/blacklist.h |
| diff --git a/chrome/browser/extensions/blacklist.h b/chrome/browser/extensions/blacklist.h |
| index 58b12dbab31fdf098a4e48d76b81e9f40ef6a079..503e02045cd3137edb08424230709a0504d3b3fc 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,23 @@ class Blacklist { |
| Blacklist* blacklist_; |
| }; |
| + typedef base::Callback<void(const std::set<std::string>&)> |
| + IsBlacklistedCallback; |
| + |
| // |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 IsBlacklisted(const std::set<std::string>& ids, |
|
Yoyo Zhou
2012/11/30 23:44:07
This name reads strangely; I expect an Is* functio
not at google - send to devlin
2012/12/01 02:51:30
Done.
|
| + const IsBlacklistedCallback& callback); |
| + |
| + // Convenient form of |IsBlacklisted| for a single extension ID. |
| + void IsBlacklisted(const std::string& id, |
| + const IsBlacklistedCallback& callback); |
|
Yoyo Zhou
2012/11/30 23:44:07
The callback parameter doesn't seem that convenien
not at google - send to devlin
2012/12/01 02:51:30
Done.
|
| // Sets the blacklist from the updater to contain the extension IDs in |ids| |
| void SetFromUpdater(const std::vector<std::string>& ids, |