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 <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 // Internal implementation of ReadyToCommitNavigation which doesn't use | 147 // Internal implementation of ReadyToCommitNavigation which doesn't use |
148 // NavigationHandle to ease unit tests. | 148 // NavigationHandle to ease unit tests. |
149 void ReadyToCommitNavigationInternal( | 149 void ReadyToCommitNavigationInternal( |
150 content::RenderFrameHost* render_frame_host, | 150 content::RenderFrameHost* render_frame_host, |
151 const GURL& url, | 151 const GURL& url, |
152 const content::Referrer& referrer, | 152 const content::Referrer& referrer, |
153 ui::PageTransition page_transition); | 153 ui::PageTransition page_transition); |
154 | 154 |
155 bool DidURLMatchCurrentActivationList(const GURL& url) const; | 155 bool DidURLMatchCurrentActivationList(const GURL& url) const; |
| 156 bool DidURLMatchSubresourceFilterOnlyList(const GURL& url) const; |
156 | 157 |
157 void AddActivationListMatch(const GURL& url, ActivationList match_type); | 158 void AddActivationListMatch(const GURL& url, ActivationList match_type); |
158 void RecordRedirectChainMatchPattern() const; | 159 void RecordRedirectChainMatchPattern() const; |
159 | 160 |
160 std::unique_ptr<SubresourceFilterClient> client_; | 161 std::unique_ptr<SubresourceFilterClient> client_; |
161 | 162 |
162 HostPathSet whitelisted_hosts_; | 163 HostPathSet whitelisted_hosts_; |
163 | 164 |
164 ActivationLevel activation_level_; | 165 ActivationLevel activation_level_; |
165 ActivationDecision activation_decision_; | 166 ActivationDecision activation_decision_; |
166 bool measure_performance_; | 167 bool measure_performance_; |
167 | 168 |
168 // The URLs in the navigation chain. | 169 // The URLs in the navigation chain. |
169 std::vector<GURL> navigation_chain_; | 170 std::vector<GURL> navigation_chain_; |
170 | 171 |
171 URLToActivationListsMap activation_list_matches_; | 172 URLToActivationListsMap activation_list_matches_; |
172 | 173 |
173 // Statistics about subresource loads, aggregated across all frames of the | 174 // Statistics about subresource loads, aggregated across all frames of the |
174 // current page. | 175 // current page. |
175 DocumentLoadStatistics aggregated_document_statistics_; | 176 DocumentLoadStatistics aggregated_document_statistics_; |
176 | 177 |
| 178 bool subresource_filter_only_hit_; |
| 179 |
177 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); | 180 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); |
178 }; | 181 }; |
179 | 182 |
180 } // namespace subresource_filter | 183 } // namespace subresource_filter |
181 | 184 |
182 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL
TER_DRIVER_FACTORY_H_ | 185 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL
TER_DRIVER_FACTORY_H_ |
OLD | NEW |