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

Unified Diff: chrome/browser/extensions/blacklist.cc

Issue 12211029: Sanity tweaks to the extension blacklist: check all extensions at once on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mpcomplete Created 7 years, 10 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
« no previous file with comments | « chrome/browser/extensions/blacklist.h ('k') | chrome/browser/extensions/crx_installer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/blacklist.cc
diff --git a/chrome/browser/extensions/blacklist.cc b/chrome/browser/extensions/blacklist.cc
index 12e5a7a524dfc6c129851dd65215c279da9b2e95..f8eaec3b56195b2195d940b7be9d7f9383a09c73 100644
--- a/chrome/browser/extensions/blacklist.cc
+++ b/chrome/browser/extensions/blacklist.cc
@@ -181,6 +181,20 @@ void Blacklist::GetBlacklistedIDs(const std::set<std::string>& ids,
callback));
}
+namespace {
+void IsNotEmpty(const Blacklist::IsBlacklistedCallback& callback,
+ const std::set<std::string>& set) {
+ callback.Run(set.empty());
+}
+} // namespace
Matt Perry 2013/02/07 02:16:33 nit: I think this might be against the style guide
not at google - send to devlin 2013/02/07 02:26:58 Done.
+
+void Blacklist::IsBlacklisted(const std::string& extension_id,
+ const IsBlacklistedCallback& callback) {
+ std::set<std::string> check;
+ check.insert(extension_id);
+ GetBlacklistedIDs(check, base::Bind(&IsNotEmpty, callback));
+}
+
void Blacklist::SetFromUpdater(const std::vector<std::string>& ids,
const std::string& version) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
« no previous file with comments | « chrome/browser/extensions/blacklist.h ('k') | chrome/browser/extensions/crx_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698