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

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

Issue 2645283007: Add the client for accessing Subresource Filter only list. (Closed)
Patch Set: fix unittest Created 3 years, 10 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void ActivateForFrameHostIfNeeded(content::RenderFrameHost* render_frame_host, 117 void ActivateForFrameHostIfNeeded(content::RenderFrameHost* render_frame_host,
118 const GURL& url); 118 const GURL& url);
119 119
120 // Internal implementation of ReadyToCommitNavigation which doesn't use 120 // Internal implementation of ReadyToCommitNavigation which doesn't use
121 // NavigationHandle to ease unit tests. 121 // NavigationHandle to ease unit tests.
122 void ReadyToCommitNavigationInternal( 122 void ReadyToCommitNavigationInternal(
123 content::RenderFrameHost* render_frame_host, 123 content::RenderFrameHost* render_frame_host,
124 const GURL& url); 124 const GURL& url);
125 125
126 bool DidURLMatchCurrentActivationList(const GURL& url) const; 126 bool DidURLMatchCurrentActivationList(const GURL& url) const;
127 bool DidURLMatchSubresourceFilterOnlyList(const GURL& url) const;
127 128
128 void AddActivationListMatch(const GURL& url, ActivationList match_type); 129 void AddActivationListMatch(const GURL& url, ActivationList match_type);
129 void RecordRedirectChainMatchPattern() const; 130 void RecordRedirectChainMatchPattern() const;
130 131
131 FrameHostToOwnedDriverMap frame_drivers_; 132 FrameHostToOwnedDriverMap frame_drivers_;
132 std::unique_ptr<SubresourceFilterClient> client_; 133 std::unique_ptr<SubresourceFilterClient> client_;
133 134
134 HostPathSet whitelisted_hosts_; 135 HostPathSet whitelisted_hosts_;
135 136
136 ActivationLevel activation_level_; 137 ActivationLevel activation_level_;
137 bool measure_performance_; 138 bool measure_performance_;
138 139
139 // The URLs in the navigation chain. 140 // The URLs in the navigation chain.
140 std::vector<GURL> navigation_chain_; 141 std::vector<GURL> navigation_chain_;
141 142
142 URLToActivationListsMap activation_list_matches_; 143 URLToActivationListsMap activation_list_matches_;
143 144
144 // Statistics about subresource loads, aggregated across all frames of the 145 // Statistics about subresource loads, aggregated across all frames of the
145 // current page. 146 // current page.
146 DocumentLoadStatistics aggregated_document_statistics_; 147 DocumentLoadStatistics aggregated_document_statistics_;
147 148
149 bool subresource_filter_only_hit_;
150
148 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory); 151 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterDriverFactory);
149 }; 152 };
150 153
151 } // namespace subresource_filter 154 } // namespace subresource_filter
152 155
153 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL TER_DRIVER_FACTORY_H_ 156 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL TER_DRIVER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698