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

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

Issue 8733004: Make ExtensionService use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: = Created 9 years, 1 month 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
Index: chrome/common/extensions/extension_set.cc
diff --git a/chrome/common/extensions/extension_set.cc b/chrome/common/extensions/extension_set.cc
index 105420bc9605d368c96f8fae11fa6f772e158342..5984cb52459d1d36e6d6b6c158e80b724ba4477f 100644
--- a/chrome/common/extensions/extension_set.cc
+++ b/chrome/common/extensions/extension_set.cc
@@ -17,6 +17,10 @@ size_t ExtensionSet::size() const {
return extensions_.size();
}
+bool ExtensionSet::empty() const {
Aaron Boodman 2011/12/01 08:27:12 I prefer is_empty() to avoid confusion with clear(
Yoyo Zhou 2011/12/05 19:34:09 Done.
+ return extensions_.empty();
+}
+
bool ExtensionSet::Contains(const std::string& extension_id) const {
return extensions_.find(extension_id) != extensions_.end();
}
@@ -29,7 +33,11 @@ void ExtensionSet::Remove(const std::string& id) {
extensions_.erase(id);
}
-std::string ExtensionSet::GetIdByURL(const GURL& url) const {
+void ExtensionSet::Clear() {
+ extensions_.clear();
+}
+
+std::string ExtensionSet::GetIDByURL(const GURL& url) const {
if (url.SchemeIs(chrome::kExtensionScheme))
return url.host();

Powered by Google App Engine
This is Rietveld 408576698