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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.h

Issue 1857383002: Refactor net predictor to use ResourceThrottles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on #396550 Created 4 years, 6 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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 14 matching lines...) Expand all
25 class PrefService; 25 class PrefService;
26 26
27 template<class T> class PrefMember; 27 template<class T> class PrefMember;
28 28
29 typedef PrefMember<bool> BooleanPrefMember; 29 typedef PrefMember<bool> BooleanPrefMember;
30 30
31 namespace base { 31 namespace base {
32 class Value; 32 class Value;
33 } 33 }
34 34
35 namespace chrome_browser_net {
36 class ConnectInterceptor;
37 class Predictor;
38 }
39
40 namespace content_settings { 35 namespace content_settings {
41 class CookieSettings; 36 class CookieSettings;
42 } 37 }
43 38
44 namespace data_usage { 39 namespace data_usage {
45 class DataUseAggregator; 40 class DataUseAggregator;
46 } 41 }
47 42
48 namespace domain_reliability { 43 namespace domain_reliability {
49 class DomainReliabilityMonitor; 44 class DomainReliabilityMonitor;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void set_profile_path(const base::FilePath& profile_path) { 89 void set_profile_path(const base::FilePath& profile_path) {
95 profile_path_ = profile_path; 90 profile_path_ = profile_path;
96 } 91 }
97 92
98 // If |cookie_settings| is NULL or not set, all cookies are enabled, 93 // If |cookie_settings| is NULL or not set, all cookies are enabled,
99 // otherwise the settings are enforced on all observed network requests. 94 // otherwise the settings are enforced on all observed network requests.
100 // Not inlined because we assign a scoped_refptr, which requires us to include 95 // Not inlined because we assign a scoped_refptr, which requires us to include
101 // the header file. Here we just forward-declare it. 96 // the header file. Here we just forward-declare it.
102 void set_cookie_settings(content_settings::CookieSettings* cookie_settings); 97 void set_cookie_settings(content_settings::CookieSettings* cookie_settings);
103 98
104 // Causes requested URLs to be fed to |predictor| via ConnectInterceptor.
105 void set_predictor(chrome_browser_net::Predictor* predictor);
106
107 void set_enable_do_not_track(BooleanPrefMember* enable_do_not_track) { 99 void set_enable_do_not_track(BooleanPrefMember* enable_do_not_track) {
108 enable_do_not_track_ = enable_do_not_track; 100 enable_do_not_track_ = enable_do_not_track;
109 } 101 }
110 102
111 void set_force_google_safe_search( 103 void set_force_google_safe_search(
112 BooleanPrefMember* force_google_safe_search) { 104 BooleanPrefMember* force_google_safe_search) {
113 force_google_safe_search_ = force_google_safe_search; 105 force_google_safe_search_ = force_google_safe_search;
114 } 106 }
115 107
116 void set_force_youtube_safety_mode( 108 void set_force_youtube_safety_mode(
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void ReportDataUsageStats(net::URLRequest* request, 192 void ReportDataUsageStats(net::URLRequest* request,
201 int64_t tx_bytes, 193 int64_t tx_bytes,
202 int64_t rx_bytes); 194 int64_t rx_bytes);
203 195
204 std::unique_ptr<ChromeExtensionsNetworkDelegate> extensions_delegate_; 196 std::unique_ptr<ChromeExtensionsNetworkDelegate> extensions_delegate_;
205 197
206 void* profile_; 198 void* profile_;
207 base::FilePath profile_path_; 199 base::FilePath profile_path_;
208 scoped_refptr<content_settings::CookieSettings> cookie_settings_; 200 scoped_refptr<content_settings::CookieSettings> cookie_settings_;
209 201
210 std::unique_ptr<chrome_browser_net::ConnectInterceptor> connect_interceptor_;
211
212 // Weak, owned by our owner. 202 // Weak, owned by our owner.
213 BooleanPrefMember* enable_referrers_; 203 BooleanPrefMember* enable_referrers_;
214 BooleanPrefMember* enable_do_not_track_; 204 BooleanPrefMember* enable_do_not_track_;
215 BooleanPrefMember* force_google_safe_search_; 205 BooleanPrefMember* force_google_safe_search_;
216 BooleanPrefMember* force_youtube_safety_mode_; 206 BooleanPrefMember* force_youtube_safety_mode_;
217 StringPrefMember* allowed_domains_for_apps_; 207 StringPrefMember* allowed_domains_for_apps_;
218 208
219 // Weak, owned by our owner. 209 // Weak, owned by our owner.
220 const policy::URLBlacklistManager* url_blacklist_manager_; 210 const policy::URLBlacklistManager* url_blacklist_manager_;
221 domain_reliability::DomainReliabilityMonitor* domain_reliability_monitor_; 211 domain_reliability::DomainReliabilityMonitor* domain_reliability_monitor_;
222 212
223 // When true, allow access to all file:// URLs. 213 // When true, allow access to all file:// URLs.
224 static bool g_allow_file_access_; 214 static bool g_allow_file_access_;
225 215
226 // Component to measure data use. 216 // Component to measure data use.
227 data_use_measurement::DataUseMeasurement data_use_measurement_; 217 data_use_measurement::DataUseMeasurement data_use_measurement_;
228 218
229 bool experimental_web_platform_features_enabled_; 219 bool experimental_web_platform_features_enabled_;
230 220
231 // Aggregates and reports network usage. 221 // Aggregates and reports network usage.
232 data_usage::DataUseAggregator* data_use_aggregator_; 222 data_usage::DataUseAggregator* data_use_aggregator_;
233 // Controls whether network usage is reported as being off the record. 223 // Controls whether network usage is reported as being off the record.
234 bool is_data_usage_off_the_record_; 224 bool is_data_usage_off_the_record_;
235 225
236 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); 226 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
237 }; 227 };
238 228
239 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 229 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698