OLD | NEW |
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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 void set_enable_do_not_track(BooleanPrefMember* enable_do_not_track) { | 116 void set_enable_do_not_track(BooleanPrefMember* enable_do_not_track) { |
117 enable_do_not_track_ = enable_do_not_track; | 117 enable_do_not_track_ = enable_do_not_track; |
118 } | 118 } |
119 | 119 |
120 void set_force_google_safe_search( | 120 void set_force_google_safe_search( |
121 BooleanPrefMember* force_google_safe_search) { | 121 BooleanPrefMember* force_google_safe_search) { |
122 force_google_safe_search_ = force_google_safe_search; | 122 force_google_safe_search_ = force_google_safe_search; |
123 } | 123 } |
124 | 124 |
| 125 void set_data_reduction_proxy_enabled( |
| 126 BooleanPrefMember* data_reduction_proxy_enabled) { |
| 127 data_reduction_proxy_enabled_ = data_reduction_proxy_enabled; |
| 128 } |
| 129 |
125 void set_domain_reliability_monitor( | 130 void set_domain_reliability_monitor( |
126 domain_reliability::DomainReliabilityMonitor* monitor) { | 131 domain_reliability::DomainReliabilityMonitor* monitor) { |
127 domain_reliability_monitor_ = monitor; | 132 domain_reliability_monitor_ = monitor; |
128 } | 133 } |
129 | 134 |
130 void set_prerender_tracker(prerender::PrerenderTracker* prerender_tracker) { | 135 void set_prerender_tracker(prerender::PrerenderTracker* prerender_tracker) { |
131 prerender_tracker_ = prerender_tracker; | 136 prerender_tracker_ = prerender_tracker; |
132 } | 137 } |
133 | 138 |
134 // |data_reduction_proxy_params_| must outlive this ChromeNetworkDelegate. | 139 // |data_reduction_proxy_params_| must outlive this ChromeNetworkDelegate. |
(...skipping 27 matching lines...) Expand all Loading... |
162 // instances of this object. | 167 // instances of this object. |
163 static void NeverThrottleRequests(); | 168 static void NeverThrottleRequests(); |
164 | 169 |
165 // Binds the pref members to |pref_service| and moves them to the IO thread. | 170 // Binds the pref members to |pref_service| and moves them to the IO thread. |
166 // |enable_referrers| cannot be NULL, the others can. | 171 // |enable_referrers| cannot be NULL, the others can. |
167 // This method should be called on the UI thread. | 172 // This method should be called on the UI thread. |
168 static void InitializePrefsOnUIThread( | 173 static void InitializePrefsOnUIThread( |
169 BooleanPrefMember* enable_referrers, | 174 BooleanPrefMember* enable_referrers, |
170 BooleanPrefMember* enable_do_not_track, | 175 BooleanPrefMember* enable_do_not_track, |
171 BooleanPrefMember* force_google_safe_search, | 176 BooleanPrefMember* force_google_safe_search, |
| 177 BooleanPrefMember* data_reduction_proxy_enabled, |
172 PrefService* pref_service); | 178 PrefService* pref_service); |
173 | 179 |
174 // When called, all file:// URLs will now be accessible. If this is not | 180 // When called, all file:// URLs will now be accessible. If this is not |
175 // called, then some platforms restrict access to file:// paths. | 181 // called, then some platforms restrict access to file:// paths. |
176 static void AllowAccessToAllFiles(); | 182 static void AllowAccessToAllFiles(); |
177 | 183 |
178 // Creates a Value summary of the persistent state of the network session. | 184 // Creates a Value summary of the persistent state of the network session. |
179 // The caller is responsible for deleting the returned value. | 185 // The caller is responsible for deleting the returned value. |
180 // Must be called on the UI thread. | 186 // Must be called on the UI thread. |
181 static base::Value* HistoricNetworkStatsInfoToValue(); | 187 static base::Value* HistoricNetworkStatsInfoToValue(); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 void* profile_; | 254 void* profile_; |
249 base::FilePath profile_path_; | 255 base::FilePath profile_path_; |
250 scoped_refptr<CookieSettings> cookie_settings_; | 256 scoped_refptr<CookieSettings> cookie_settings_; |
251 | 257 |
252 scoped_ptr<chrome_browser_net::ConnectInterceptor> connect_interceptor_; | 258 scoped_ptr<chrome_browser_net::ConnectInterceptor> connect_interceptor_; |
253 | 259 |
254 // Weak, owned by our owner. | 260 // Weak, owned by our owner. |
255 BooleanPrefMember* enable_referrers_; | 261 BooleanPrefMember* enable_referrers_; |
256 BooleanPrefMember* enable_do_not_track_; | 262 BooleanPrefMember* enable_do_not_track_; |
257 BooleanPrefMember* force_google_safe_search_; | 263 BooleanPrefMember* force_google_safe_search_; |
| 264 BooleanPrefMember* data_reduction_proxy_enabled_; |
258 | 265 |
259 // Weak, owned by our owner. | 266 // Weak, owned by our owner. |
260 #if defined(ENABLE_CONFIGURATION_POLICY) | 267 #if defined(ENABLE_CONFIGURATION_POLICY) |
261 const policy::URLBlacklistManager* url_blacklist_manager_; | 268 const policy::URLBlacklistManager* url_blacklist_manager_; |
262 #endif | 269 #endif |
263 domain_reliability::DomainReliabilityMonitor* domain_reliability_monitor_; | 270 domain_reliability::DomainReliabilityMonitor* domain_reliability_monitor_; |
264 | 271 |
265 // When true, allow access to all file:// URLs. | 272 // When true, allow access to all file:// URLs. |
266 static bool g_allow_file_access_; | 273 static bool g_allow_file_access_; |
267 | 274 |
(...skipping 26 matching lines...) Expand all Loading... |
294 data_reduction_proxy_usage_stats_; | 301 data_reduction_proxy_usage_stats_; |
295 data_reduction_proxy::DataReductionProxyAuthRequestHandler* | 302 data_reduction_proxy::DataReductionProxyAuthRequestHandler* |
296 data_reduction_proxy_auth_request_handler_; | 303 data_reduction_proxy_auth_request_handler_; |
297 | 304 |
298 OnResolveProxyHandler on_resolve_proxy_handler_; | 305 OnResolveProxyHandler on_resolve_proxy_handler_; |
299 | 306 |
300 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 307 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
301 }; | 308 }; |
302 | 309 |
303 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 310 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
OLD | NEW |