OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER
_DRIVER_FACTORY_H_ | 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER
_DRIVER_FACTORY_H_ |
6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER
_DRIVER_FACTORY_H_ | 6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER
_DRIVER_FACTORY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 // Checks base on the value of |url| and current activation scope if | 136 // Checks base on the value of |url| and current activation scope if |
137 // activation signal should be sent. | 137 // activation signal should be sent. |
138 ActivationDecision ComputeActivationDecisionForMainFrameNavigation( | 138 ActivationDecision ComputeActivationDecisionForMainFrameNavigation( |
139 content::NavigationHandle* navigation_handle) const; | 139 content::NavigationHandle* navigation_handle) const; |
140 | 140 |
141 bool DidURLMatchActivationList(const GURL& url, | 141 bool DidURLMatchActivationList(const GURL& url, |
142 ActivationList activation_list) const; | 142 ActivationList activation_list) const; |
143 | 143 |
144 void AddActivationListMatch(const GURL& url, ActivationList match_type); | 144 void AddActivationListMatch(const GURL& url, ActivationList match_type); |
145 int CalculateHitPatternForActivationList( | |
146 ActivationList activation_list) const; | |
147 void RecordRedirectChainMatchPattern() const; | 145 void RecordRedirectChainMatchPattern() const; |
148 | 146 |
149 void RecordRedirectChainMatchPatternForList( | 147 void RecordRedirectChainMatchPatternForList( |
150 ActivationList activation_list) const; | 148 ActivationList activation_list) const; |
151 | 149 |
152 std::unique_ptr<SubresourceFilterClient> client_; | 150 std::unique_ptr<SubresourceFilterClient> client_; |
153 | 151 |
154 std::unique_ptr<ContentSubresourceFilterThrottleManager> throttle_manager_; | 152 std::unique_ptr<ContentSubresourceFilterThrottleManager> throttle_manager_; |
155 | 153 |
156 ActivationLevel activation_level_; | 154 ActivationLevel activation_level_; |
157 ActivationDecision activation_decision_; | 155 ActivationDecision activation_decision_; |
158 bool measure_performance_; | 156 bool measure_performance_; |
159 | 157 |
160 // The URLs in the navigation chain. | 158 // The URLs in the navigation chain. |
161 std::vector<GURL> navigation_chain_; | 159 std::vector<GURL> navigation_chain_; |
162 | 160 |
163 URLToActivationListsMap activation_list_matches_; | 161 URLToActivationListsMap activation_list_matches_; |
164 | 162 |
165 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); | 163 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); |
166 }; | 164 }; |
167 | 165 |
168 } // namespace subresource_filter | 166 } // namespace subresource_filter |
169 | 167 |
170 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL
TER_DRIVER_FACTORY_H_ | 168 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL
TER_DRIVER_FACTORY_H_ |
OLD | NEW |