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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 content::NavigationHandle* navigation_handle) override; | 94 content::NavigationHandle* navigation_handle) override; |
95 | 95 |
96 // Checks base on the value of |url| and current activation scope if | 96 // Checks base on the value of |url| and current activation scope if |
97 // activation signal should be sent. | 97 // activation signal should be sent. |
98 void ComputeActivationForMainFrameNavigation( | 98 void ComputeActivationForMainFrameNavigation( |
99 content::NavigationHandle* navigation_handle, | 99 content::NavigationHandle* navigation_handle, |
100 ActivationList matched_list); | 100 ActivationList matched_list); |
101 | 101 |
102 // Returns whether a main-frame navigation to the given |url| satisfies the | 102 // Returns whether a main-frame navigation to the given |url| satisfies the |
103 // activation |conditions| of a given configuration, except for |priority|. | 103 // activation |conditions| of a given configuration, except for |priority|. |
| 104 // Pass |scheme_is_http_or_https| to avoid multiple string comparisons. |
104 bool DoesMainFrameURLSatisfyActivationConditions( | 105 bool DoesMainFrameURLSatisfyActivationConditions( |
105 const GURL& url, | 106 const GURL& url, |
| 107 bool scheme_is_http_or_https, |
106 const Configuration::ActivationConditions& conditions, | 108 const Configuration::ActivationConditions& conditions, |
107 ActivationList matched_list) const; | 109 ActivationList matched_list) const; |
108 | 110 |
109 // Must outlive this class. | 111 // Must outlive this class. |
110 SubresourceFilterClient* client_; | 112 SubresourceFilterClient* client_; |
111 | 113 |
112 std::unique_ptr<ContentSubresourceFilterThrottleManager> throttle_manager_; | 114 std::unique_ptr<ContentSubresourceFilterThrottleManager> throttle_manager_; |
113 | 115 |
114 // The activation decision corresponding to the most recently _started_ | 116 // The activation decision corresponding to the most recently _started_ |
115 // non-same-document navigation in the main frame. | 117 // non-same-document navigation in the main frame. |
(...skipping 14 matching lines...) Expand all Loading... |
130 // reaches the WillProcessResponse stage (or successfully finishes if | 132 // reaches the WillProcessResponse stage (or successfully finishes if |
131 // throttles are not invoked). | 133 // throttles are not invoked). |
132 Configuration::ActivationOptions activation_options_; | 134 Configuration::ActivationOptions activation_options_; |
133 | 135 |
134 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); | 136 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); |
135 }; | 137 }; |
136 | 138 |
137 } // namespace subresource_filter | 139 } // namespace subresource_filter |
138 | 140 |
139 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL
TER_DRIVER_FACTORY_H_ | 141 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL
TER_DRIVER_FACTORY_H_ |
OLD | NEW |