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

Unified Diff: chrome/common/extensions/extension_set.cc

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/common/extensions/extension_set.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_set.cc
diff --git a/chrome/common/extensions/extension_set.cc b/chrome/common/extensions/extension_set.cc
index 26ac47c07b783a8f43cffe82c52d9d5900f7109e..01f35fd652bf52838c3aa3f2d6e40b879b2e9eda 100644
--- a/chrome/common/extensions/extension_set.cc
+++ b/chrome/common/extensions/extension_set.cc
@@ -63,8 +63,8 @@ bool ExtensionSet::InsertAll(const ExtensionSet& extensions) {
return size() != before;
}
-void ExtensionSet::Remove(const std::string& id) {
- extensions_.erase(id);
+bool ExtensionSet::Remove(const std::string& id) {
+ return extensions_.erase(id) > 0;
}
void ExtensionSet::Clear() {
@@ -137,6 +137,15 @@ const Extension* ExtensionSet::GetByID(const std::string& id) const {
return NULL;
}
+std::set<std::string> ExtensionSet::GetIDs() const {
+ std::set<std::string> ids;
+ for (ExtensionMap::const_iterator it = extensions_.begin();
+ it != extensions_.end(); ++it) {
+ ids.insert(it->first);
+ }
+ return ids;
+}
+
bool ExtensionSet::ExtensionBindingsAllowed(
const ExtensionURLInfo& info) const {
if (info.origin().isUnique() || IsSandboxedPage(info))
« no previous file with comments | « chrome/common/extensions/extension_set.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698