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

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: more comment changes Created 4 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 (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 13 matching lines...) Expand all
24 class PrefService; 24 class PrefService;
25 25
26 template<class T> class PrefMember; 26 template<class T> class PrefMember;
27 27
28 typedef PrefMember<bool> BooleanPrefMember; 28 typedef PrefMember<bool> BooleanPrefMember;
29 29
30 namespace base { 30 namespace base {
31 class Value; 31 class Value;
32 } 32 }
33 33
34 namespace chrome_browser_net {
35 class ConnectInterceptor;
36 class Predictor;
37 }
38
39 namespace content_settings { 34 namespace content_settings {
40 class CookieSettings; 35 class CookieSettings;
41 } 36 }
42 37
43 namespace data_usage { 38 namespace data_usage {
44 class DataUseAggregator; 39 class DataUseAggregator;
45 } 40 }
46 41
47 namespace domain_reliability { 42 namespace domain_reliability {
48 class DomainReliabilityMonitor; 43 class DomainReliabilityMonitor;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void set_profile_path(const base::FilePath& profile_path) { 88 void set_profile_path(const base::FilePath& profile_path) {
94 profile_path_ = profile_path; 89 profile_path_ = profile_path;
95 } 90 }
96 91
97 // If |cookie_settings| is NULL or not set, all cookies are enabled, 92 // If |cookie_settings| is NULL or not set, all cookies are enabled,
98 // otherwise the settings are enforced on all observed network requests. 93 // otherwise the settings are enforced on all observed network requests.
99 // Not inlined because we assign a scoped_refptr, which requires us to include 94 // Not inlined because we assign a scoped_refptr, which requires us to include
100 // the header file. Here we just forward-declare it. 95 // the header file. Here we just forward-declare it.
101 void set_cookie_settings(content_settings::CookieSettings* cookie_settings); 96 void set_cookie_settings(content_settings::CookieSettings* cookie_settings);
102 97
103 // Causes requested URLs to be fed to |predictor| via ConnectInterceptor.
104 void set_predictor(chrome_browser_net::Predictor* predictor);
105
106 void set_enable_do_not_track(BooleanPrefMember* enable_do_not_track) { 98 void set_enable_do_not_track(BooleanPrefMember* enable_do_not_track) {
107 enable_do_not_track_ = enable_do_not_track; 99 enable_do_not_track_ = enable_do_not_track;
108 } 100 }
109 101
110 void set_force_google_safe_search( 102 void set_force_google_safe_search(
111 BooleanPrefMember* force_google_safe_search) { 103 BooleanPrefMember* force_google_safe_search) {
112 force_google_safe_search_ = force_google_safe_search; 104 force_google_safe_search_ = force_google_safe_search;
113 } 105 }
114 106
115 void set_force_youtube_safety_mode( 107 void set_force_youtube_safety_mode(
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 void ReportDataUsageStats(net::URLRequest* request, 185 void ReportDataUsageStats(net::URLRequest* request,
194 int64_t tx_bytes, 186 int64_t tx_bytes,
195 int64_t rx_bytes); 187 int64_t rx_bytes);
196 188
197 std::unique_ptr<ChromeExtensionsNetworkDelegate> extensions_delegate_; 189 std::unique_ptr<ChromeExtensionsNetworkDelegate> extensions_delegate_;
198 190
199 void* profile_; 191 void* profile_;
200 base::FilePath profile_path_; 192 base::FilePath profile_path_;
201 scoped_refptr<content_settings::CookieSettings> cookie_settings_; 193 scoped_refptr<content_settings::CookieSettings> cookie_settings_;
202 194
203 std::unique_ptr<chrome_browser_net::ConnectInterceptor> connect_interceptor_;
204
205 // Weak, owned by our owner. 195 // Weak, owned by our owner.
206 BooleanPrefMember* enable_referrers_; 196 BooleanPrefMember* enable_referrers_;
207 BooleanPrefMember* enable_do_not_track_; 197 BooleanPrefMember* enable_do_not_track_;
208 BooleanPrefMember* force_google_safe_search_; 198 BooleanPrefMember* force_google_safe_search_;
209 BooleanPrefMember* force_youtube_safety_mode_; 199 BooleanPrefMember* force_youtube_safety_mode_;
210 200
211 // Weak, owned by our owner. 201 // Weak, owned by our owner.
212 const policy::URLBlacklistManager* url_blacklist_manager_; 202 const policy::URLBlacklistManager* url_blacklist_manager_;
213 domain_reliability::DomainReliabilityMonitor* domain_reliability_monitor_; 203 domain_reliability::DomainReliabilityMonitor* domain_reliability_monitor_;
214 204
215 // When true, allow access to all file:// URLs. 205 // When true, allow access to all file:// URLs.
216 static bool g_allow_file_access_; 206 static bool g_allow_file_access_;
217 207
218 // Component to measure data use. 208 // Component to measure data use.
219 data_use_measurement::DataUseMeasurement data_use_measurement_; 209 data_use_measurement::DataUseMeasurement data_use_measurement_;
220 210
221 bool experimental_web_platform_features_enabled_; 211 bool experimental_web_platform_features_enabled_;
222 212
223 // Aggregates and reports network usage. 213 // Aggregates and reports network usage.
224 data_usage::DataUseAggregator* data_use_aggregator_; 214 data_usage::DataUseAggregator* data_use_aggregator_;
225 // Controls whether network usage is reported as being off the record. 215 // Controls whether network usage is reported as being off the record.
226 bool is_data_usage_off_the_record_; 216 bool is_data_usage_off_the_record_;
227 217
228 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); 218 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
229 }; 219 };
230 220
231 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 221 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698