| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Patterns used in content setting rules. | 5 // Patterns used in content setting rules. |
| 6 | 6 |
| 7 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_PATTERN_H_ | 7 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_PATTERN_H_ |
| 8 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_PATTERN_H_ | 8 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_PATTERN_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 bool operator!=(const ContentSettingsPattern& other) const; | 214 bool operator!=(const ContentSettingsPattern& other) const; |
| 215 | 215 |
| 216 // Returns true if the pattern has a lower priority than the |other| pattern. | 216 // Returns true if the pattern has a lower priority than the |other| pattern. |
| 217 bool operator<(const ContentSettingsPattern& other) const; | 217 bool operator<(const ContentSettingsPattern& other) const; |
| 218 | 218 |
| 219 // Returns true if the pattern has a higher priority than the |other| pattern. | 219 // Returns true if the pattern has a higher priority than the |other| pattern. |
| 220 bool operator>(const ContentSettingsPattern& other) const; | 220 bool operator>(const ContentSettingsPattern& other) const; |
| 221 | 221 |
| 222 private: | 222 private: |
| 223 friend class content_settings::PatternParser; | 223 friend class content_settings::PatternParser; |
| 224 friend class ContentSettingsPatternSerializer; | |
| 225 friend struct mojo::StructTraits< | 224 friend struct mojo::StructTraits< |
| 226 content_settings::mojom::ContentSettingsPatternDataView, | 225 content_settings::mojom::ContentSettingsPatternDataView, |
| 227 ContentSettingsPattern>; | 226 ContentSettingsPattern>; |
| 228 FRIEND_TEST_ALL_PREFIXES(ContentSettingsPatternParserTest, SerializePatterns); | 227 FRIEND_TEST_ALL_PREFIXES(ContentSettingsPatternParserTest, SerializePatterns); |
| 229 | 228 |
| 230 class Builder; | 229 class Builder; |
| 231 | 230 |
| 232 static Relation CompareScheme( | 231 static Relation CompareScheme( |
| 233 const ContentSettingsPattern::PatternParts& parts, | 232 const ContentSettingsPattern::PatternParts& parts, |
| 234 const ContentSettingsPattern::PatternParts& other_parts); | 233 const ContentSettingsPattern::PatternParts& other_parts); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 246 const ContentSettingsPattern::PatternParts& other_parts); | 245 const ContentSettingsPattern::PatternParts& other_parts); |
| 247 | 246 |
| 248 ContentSettingsPattern(const PatternParts& parts, bool valid); | 247 ContentSettingsPattern(const PatternParts& parts, bool valid); |
| 249 | 248 |
| 250 PatternParts parts_; | 249 PatternParts parts_; |
| 251 | 250 |
| 252 bool is_valid_; | 251 bool is_valid_; |
| 253 }; | 252 }; |
| 254 | 253 |
| 255 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_PATTERN_H_ | 254 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_PATTERN_H_ |
| OLD | NEW |