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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 129 } |
130 | 130 |
131 // TODO(https://crbug.com/708181): Allow tests to change the configuration | 131 // TODO(https://crbug.com/708181): Allow tests to change the configuration |
132 // after construction (which happens at WebContents creation) but before a | 132 // after construction (which happens at WebContents creation) but before a |
133 // navigation start. Can be removed once the Safe Browsing navigation throttle | 133 // navigation start. Can be removed once the Safe Browsing navigation throttle |
134 // handles all activation decisions. | 134 // handles all activation decisions. |
135 void set_configuration_for_testing(Configuration configuration) { | 135 void set_configuration_for_testing(Configuration configuration) { |
136 configuration_ = std::move(configuration); | 136 configuration_ = std::move(configuration); |
137 } | 137 } |
138 | 138 |
| 139 SubresourceFilterClient* client() { return client_.get(); } |
| 140 |
139 private: | 141 private: |
140 friend class ContentSubresourceFilterDriverFactoryTest; | 142 friend class ContentSubresourceFilterDriverFactoryTest; |
141 friend class safe_browsing::SafeBrowsingServiceTest; | 143 friend class safe_browsing::SafeBrowsingServiceTest; |
142 | 144 |
143 void ResetActivationState(); | 145 void ResetActivationState(); |
144 | 146 |
145 void OnDocumentLoadStatistics(const DocumentLoadStatistics& statistics); | 147 void OnDocumentLoadStatistics(const DocumentLoadStatistics& statistics); |
146 | 148 |
147 bool IsWhitelisted(const GURL& url) const; | 149 bool IsWhitelisted(const GURL& url) const; |
148 | 150 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // Statistics about subresource loads, aggregated across all frames of the | 196 // Statistics about subresource loads, aggregated across all frames of the |
195 // current page. | 197 // current page. |
196 DocumentLoadStatistics aggregated_document_statistics_; | 198 DocumentLoadStatistics aggregated_document_statistics_; |
197 | 199 |
198 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); | 200 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); |
199 }; | 201 }; |
200 | 202 |
201 } // namespace subresource_filter | 203 } // namespace subresource_filter |
202 | 204 |
203 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL
TER_DRIVER_FACTORY_H_ | 205 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL
TER_DRIVER_FACTORY_H_ |
OLD | NEW |