Index: extensions/common/url_pattern_set.h |
diff --git a/extensions/common/url_pattern_set.h b/extensions/common/url_pattern_set.h |
index da6ad132db183433d726363f5d291b9e412e0158..4ee7b42c3efdd0e3ee0edbafe6f01d5945ce7e8b 100644 |
--- a/extensions/common/url_pattern_set.h |
+++ b/extensions/common/url_pattern_set.h |
@@ -59,8 +59,9 @@ class URLPatternSet { |
const_iterator begin() const { return patterns_.begin(); } |
const_iterator end() const { return patterns_.end(); } |
- // Adds a pattern to the set. Returns true if a new pattern was inserted, |
- // false if the pattern was already in the set. |
+ // Adds a pattern to the set. If a more general pattern is added, the more |
+ // specific ones are removed from the set. Returns true if a new pattern was |
+ // inserted, false if the pattern was already in the set. |
bool AddPattern(const URLPattern& pattern); |
// Adds all patterns from |set| into this. |
@@ -96,6 +97,10 @@ class URLPatternSet { |
std::string* error); |
private: |
+ // Directly inserts a pattern in the set without checking for more |
+ // generic/more specific containment conditions. |
+ bool InsertPattern(const URLPattern& pattern); |
+ |
// The list of URL patterns that comprise the extent. |
std::set<URLPattern> patterns_; |
}; |