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

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

Issue 2733833002: Change logic for recording redirect pattern histograms. (Closed)
Patch Set: fix ios Created 3 years, 9 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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const GURL& url); 145 const GURL& url);
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 DidURLMatchActivationList(const GURL& url,
156 ActivationList activation_list) const;
156 157
157 void AddActivationListMatch(const GURL& url, ActivationList match_type); 158 void AddActivationListMatch(const GURL& url, ActivationList match_type);
159 int CalculateHitPatternForActivationList(
160 ActivationList activation_list) const;
158 void RecordRedirectChainMatchPattern() const; 161 void RecordRedirectChainMatchPattern() const;
159 162
163 void RecordRedirectChainMatchPatternForList(
164 ActivationList activation_list) const;
165
160 std::unique_ptr<SubresourceFilterClient> client_; 166 std::unique_ptr<SubresourceFilterClient> client_;
161 167
162 HostPathSet whitelisted_hosts_; 168 HostPathSet whitelisted_hosts_;
163 169
164 ActivationLevel activation_level_; 170 ActivationLevel activation_level_;
165 ActivationDecision activation_decision_; 171 ActivationDecision activation_decision_;
166 bool measure_performance_; 172 bool measure_performance_;
167 173
168 // The URLs in the navigation chain. 174 // The URLs in the navigation chain.
169 std::vector<GURL> navigation_chain_; 175 std::vector<GURL> navigation_chain_;
170 176
171 URLToActivationListsMap activation_list_matches_; 177 URLToActivationListsMap activation_list_matches_;
172 178
173 // Statistics about subresource loads, aggregated across all frames of the 179 // Statistics about subresource loads, aggregated across all frames of the
174 // current page. 180 // current page.
175 DocumentLoadStatistics aggregated_document_statistics_; 181 DocumentLoadStatistics aggregated_document_statistics_;
176 182
177 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); 183 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory);
178 }; 184 };
179 185
180 } // namespace subresource_filter 186 } // namespace subresource_filter
181 187
182 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL TER_DRIVER_FACTORY_H_ 188 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL TER_DRIVER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698