Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h

Issue 2888163002: [subresource_filter] Decide UNSUPPORTED_SCHEME only if we'd otherwise activate (Closed)
Patch Set: Add comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 content::NavigationHandle* navigation_handle) override; 95 content::NavigationHandle* navigation_handle) override;
96 96
97 // Checks base on the value of |url| and current activation scope if 97 // Checks base on the value of |url| and current activation scope if
98 // activation signal should be sent. 98 // activation signal should be sent.
99 void ComputeActivationForMainFrameNavigation( 99 void ComputeActivationForMainFrameNavigation(
100 content::NavigationHandle* navigation_handle, 100 content::NavigationHandle* navigation_handle,
101 ActivationList matched_list); 101 ActivationList matched_list);
102 102
103 // Returns whether a main-frame navigation to the given |url| satisfies the 103 // Returns whether a main-frame navigation to the given |url| satisfies the
104 // activation |conditions| of a given configuration, except for |priority|. 104 // activation |conditions| of a given configuration, except for |priority|.
105 // Pass |scheme_is_http_or_https| to avoid multiple string comparisons.
105 bool DoesMainFrameURLSatisfyActivationConditions( 106 bool DoesMainFrameURLSatisfyActivationConditions(
106 const GURL& url, 107 const GURL& url,
108 bool scheme_is_http_or_https,
107 const Configuration::ActivationConditions& conditions, 109 const Configuration::ActivationConditions& conditions,
108 ActivationList matched_list) const; 110 ActivationList matched_list) const;
109 111
110 // Must outlive this class. 112 // Must outlive this class.
111 SubresourceFilterClient* client_; 113 SubresourceFilterClient* client_;
112 114
113 std::unique_ptr<ContentSubresourceFilterThrottleManager> throttle_manager_; 115 std::unique_ptr<ContentSubresourceFilterThrottleManager> throttle_manager_;
114 116
115 // The activation decision corresponding to the most recently _started_ 117 // The activation decision corresponding to the most recently _started_
116 // non-same-document navigation in the main frame. 118 // non-same-document navigation in the main frame.
(...skipping 14 matching lines...) Expand all
131 // reaches the WillProcessResponse stage (or successfully finishes if 133 // reaches the WillProcessResponse stage (or successfully finishes if
132 // throttles are not invoked). 134 // throttles are not invoked).
133 Configuration::ActivationOptions activation_options_; 135 Configuration::ActivationOptions activation_options_;
134 136
135 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); 137 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory);
136 }; 138 };
137 139
138 } // namespace subresource_filter 140 } // namespace subresource_filter
139 141
140 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL TER_DRIVER_FACTORY_H_ 142 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL TER_DRIVER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698