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