OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef COMPONENTS_URL_PATTERN_INDEX_URL_PATTERN_INDEX_H_ | 5 #ifndef COMPONENTS_URL_PATTERN_INDEX_URL_PATTERN_INDEX_H_ |
6 #define COMPONENTS_URL_PATTERN_INDEX_URL_PATTERN_INDEX_H_ | 6 #define COMPONENTS_URL_PATTERN_INDEX_URL_PATTERN_INDEX_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // |url| being first-/third-party w.r.t. its |first_party_origin|. | 117 // |url| being first-/third-party w.r.t. its |first_party_origin|. |
118 // - The rule is not generic if |disable_generic_rules| is true. | 118 // - The rule is not generic if |disable_generic_rules| is true. |
119 const flat::UrlRule* FindMatch(const GURL& url, | 119 const flat::UrlRule* FindMatch(const GURL& url, |
120 const url::Origin& first_party_origin, | 120 const url::Origin& first_party_origin, |
121 proto::ElementType element_type, | 121 proto::ElementType element_type, |
122 proto::ActivationType activation_type, | 122 proto::ActivationType activation_type, |
123 bool is_third_party, | 123 bool is_third_party, |
124 bool disable_generic_rules) const; | 124 bool disable_generic_rules) const; |
125 | 125 |
126 private: | 126 private: |
| 127 const flat::UrlRule* FindMatch(const GURL& url, |
| 128 const url::Origin& first_party_origin, |
| 129 flat::ElementType element_type, |
| 130 flat::ActivationType activation_type, |
| 131 bool is_third_party, |
| 132 bool disable_generic_rules) const; |
| 133 |
127 // Must outlive this instance. | 134 // Must outlive this instance. |
128 const flat::UrlPatternIndex* flat_index_; | 135 const flat::UrlPatternIndex* flat_index_; |
129 | 136 |
130 DISALLOW_COPY_AND_ASSIGN(UrlPatternIndexMatcher); | 137 DISALLOW_COPY_AND_ASSIGN(UrlPatternIndexMatcher); |
131 }; | 138 }; |
132 | 139 |
133 } // namespace url_pattern_index | 140 } // namespace url_pattern_index |
134 | 141 |
135 #endif // COMPONENTS_URL_PATTERN_INDEX_URL_PATTERN_INDEX_H_ | 142 #endif // COMPONENTS_URL_PATTERN_INDEX_URL_PATTERN_INDEX_H_ |
OLD | NEW |