Index: chrome/browser/content_settings/content_settings_pattern.h |
diff --git a/chrome/browser/content_settings/content_settings_pattern.h b/chrome/browser/content_settings/content_settings_pattern.h |
index 4b55683c81d473f4e99e9afcfe1fc09d72a86723..e7f5c59d623b8983eae17b177ff60b80199af86a 100644 |
--- a/chrome/browser/content_settings/content_settings_pattern.h |
+++ b/chrome/browser/content_settings/content_settings_pattern.h |
@@ -27,20 +27,32 @@ class ContentSettingsPattern { |
// sets they describe, have specific relations. |Relation| describes the |
// relation of two patterns A and B. When pattern A is compared with pattern B |
// (A compare B) interessting relations are: |
- // - IDENTITY : Pattern A and B are identical. The patterns are equal. |
- // - DISJOINT : Pattern A and B have no intersection. A and B never match |
- // a the origin of a URL at the same time. |
- // - SUCCESSOR : Pattern A and B have an intersection. But pattern B has a |
- // higher precedence than pattern A for URLs that are matched |
- // by both pattern. |
- // - PREDECESSOR : Pattern A and B have an intersection. But pattern A has a |
- // higher precedence than pattern B for URLs that are matched |
- // by both pattern. |
+ // - IDENTITY : |
+ // Pattern A and B are identical. The patterns are equal. |
+ // |
+ // - DISJOINT_DISPLAY_PRE : |
Bernhard Bauer
2011/06/01 20:18:25
It's called _ORDER_ below.
markusheintz_
2011/06/03 13:08:54
Done. In forked CL
|
+ // Pattern A and B have no intersection. A and B never match the origin of |
+ // a URL at the same time. But pattern A has a higher precedence than |
+ // pattern B when patterns are sorted. |
+ // |
+ // - DISJOINT_DISPLAY_POST : |
+ // Pattern A and B have no intersection. A and B never match the origin of |
+ // a URL at the same time. But pattern A has a lower precedence than |
+ // pattern B when patterns are sorted. |
+ // |
+ // - SUCCESSOR : |
+ // Pattern A and B have an intersection. But pattern B has a higher |
+ // precedence than pattern A for URLs that are matched by both pattern. |
+ // |
+ // - PREDECESSOR : |
+ // Pattern A and B have an intersection. But pattern A has a higher |
+ // precedence than pattern B for URLs that are matched by both pattern. |
enum Relation { |
- DISJOINT = -2, |
+ DISJOINT_ORDER_POST = -2, |
SUCCESSOR = -1, |
IDENTITY = 0, |
PREDECESSOR = 1, |
+ DISJOINT_ORDER_PRE = 2, |
}; |
class BuilderInterface { |
@@ -118,9 +130,17 @@ class ContentSettingsPattern { |
// |Relation| of the two patterns. |
Relation Compare(const ContentSettingsPattern& other) const; |
- bool operator==(const ContentSettingsPattern& other) const { |
- return Compare(other) == IDENTITY; |
- } |
+ // Returns true if the pattern and the |other| pattern are identical. |
+ bool operator==(const ContentSettingsPattern& other) const; |
+ |
+ // Returns true if the pattern and the |other| pattern are disjoint. |
+ bool operator!=(const ContentSettingsPattern& other) const; |
Bernhard Bauer
2011/06/01 20:18:25
That seems like it could cause very subtle problem
markusheintz_
2011/06/03 13:08:54
I also have a bad feeling about his. So I removed
|
+ |
+ // Returns true if the pattern has a lower priority than the |other| pattern. |
+ bool operator<(const ContentSettingsPattern& other) const; |
+ |
+ // Returns true if the pattern has a higher priority than the |other| pattern. |
+ bool operator>(const ContentSettingsPattern& other) const; |
private: |
friend class content_settings::PatternParser; |