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(); |