Index: extensions/common/url_pattern_set.h |
diff --git a/extensions/common/url_pattern_set.h b/extensions/common/url_pattern_set.h |
index 2f7113973835ffe4346b00ac199cc1723d07cd65..8f6343cb60a73d004e4ad58ad711f7075edeee78 100644 |
--- a/extensions/common/url_pattern_set.h |
+++ b/extensions/common/url_pattern_set.h |
@@ -5,6 +5,7 @@ |
#ifndef EXTENSIONS_COMMMON_URL_PATTERN_SET_H_ |
#define EXTENSIONS_COMMMON_URL_PATTERN_SET_H_ |
+#include <ostream> |
#include <set> |
#include "base/memory/scoped_ptr.h" |
@@ -68,7 +69,8 @@ class URLPatternSet { |
void ClearPatterns(); |
- // Returns true if the permission |set| is a subset of this. |
+ // Returns true if every URL that matches |set| is matched by this. In other |
+ // words, if every pattern in |set| is encompassed by a pattern in this. |
bool Contains(const URLPatternSet& set) const; |
// Test if the extent contains a URL. |
@@ -92,10 +94,15 @@ class URLPatternSet { |
std::string* error); |
private: |
+ // Returns true if any pattern in this set encompasses |pattern|. |
+ bool Encompasses(const URLPattern& pattern) const; |
+ |
// The list of URL patterns that comprise the extent. |
std::set<URLPattern> patterns_; |
}; |
+std::ostream& operator<<(std::ostream& out, const URLPatternSet& set); |
+ |
} // namespace extensions |
#endif // EXTENSIONS_COMMMON_URL_PATTERN_SET_H_ |