| 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 <memory> | 10 #include <memory> |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // |enable_referrers| cannot be nullptr, the others can. | 122 // |enable_referrers| cannot be nullptr, the others can. |
| 123 // This method should be called on the UI thread. | 123 // This method should be called on the UI thread. |
| 124 static void InitializePrefsOnUIThread( | 124 static void InitializePrefsOnUIThread( |
| 125 BooleanPrefMember* enable_referrers, | 125 BooleanPrefMember* enable_referrers, |
| 126 BooleanPrefMember* enable_do_not_track, | 126 BooleanPrefMember* enable_do_not_track, |
| 127 BooleanPrefMember* force_google_safe_search, | 127 BooleanPrefMember* force_google_safe_search, |
| 128 IntegerPrefMember* force_youtube_restrict, | 128 IntegerPrefMember* force_youtube_restrict, |
| 129 StringPrefMember* allowed_domains_for_apps, | 129 StringPrefMember* allowed_domains_for_apps, |
| 130 PrefService* pref_service); | 130 PrefService* pref_service); |
| 131 | 131 |
| 132 // When called, all file:// URLs will now be accessible. If this is not | |
| 133 // called, then some platforms restrict access to file:// paths. | |
| 134 static void AllowAccessToAllFiles(); | |
| 135 | |
| 136 private: | 132 private: |
| 137 // NetworkDelegate implementation. | 133 // NetworkDelegate implementation. |
| 138 int OnBeforeURLRequest(net::URLRequest* request, | 134 int OnBeforeURLRequest(net::URLRequest* request, |
| 139 const net::CompletionCallback& callback, | 135 const net::CompletionCallback& callback, |
| 140 GURL* new_url) override; | 136 GURL* new_url) override; |
| 141 int OnBeforeStartTransaction(net::URLRequest* request, | 137 int OnBeforeStartTransaction(net::URLRequest* request, |
| 142 const net::CompletionCallback& callback, | 138 const net::CompletionCallback& callback, |
| 143 net::HttpRequestHeaders* headers) override; | 139 net::HttpRequestHeaders* headers) override; |
| 144 void OnStartTransaction(net::URLRequest* request, | 140 void OnStartTransaction(net::URLRequest* request, |
| 145 const net::HttpRequestHeaders& headers) override; | 141 const net::HttpRequestHeaders& headers) override; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 BooleanPrefMember* enable_do_not_track_; | 196 BooleanPrefMember* enable_do_not_track_; |
| 201 BooleanPrefMember* force_google_safe_search_; | 197 BooleanPrefMember* force_google_safe_search_; |
| 202 IntegerPrefMember* force_youtube_restrict_; | 198 IntegerPrefMember* force_youtube_restrict_; |
| 203 StringPrefMember* allowed_domains_for_apps_; | 199 StringPrefMember* allowed_domains_for_apps_; |
| 204 | 200 |
| 205 // Weak, owned by our owner. | 201 // Weak, owned by our owner. |
| 206 const policy::URLBlacklistManager* url_blacklist_manager_; | 202 const policy::URLBlacklistManager* url_blacklist_manager_; |
| 207 std::unique_ptr<domain_reliability::DomainReliabilityMonitor> | 203 std::unique_ptr<domain_reliability::DomainReliabilityMonitor> |
| 208 domain_reliability_monitor_; | 204 domain_reliability_monitor_; |
| 209 | 205 |
| 210 // When true, allow access to all file:// URLs. | |
| 211 static bool g_allow_file_access_; | |
| 212 | |
| 213 bool experimental_web_platform_features_enabled_; | 206 bool experimental_web_platform_features_enabled_; |
| 214 | 207 |
| 215 // Aggregates and reports network usage. | 208 // Aggregates and reports network usage. |
| 216 data_usage::DataUseAggregator* data_use_aggregator_; | 209 data_usage::DataUseAggregator* data_use_aggregator_; |
| 217 // Controls whether network usage is reported as being off the record. | 210 // Controls whether network usage is reported as being off the record. |
| 218 bool is_data_usage_off_the_record_; | 211 bool is_data_usage_off_the_record_; |
| 219 | 212 |
| 220 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); | 213 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); |
| 221 }; | 214 }; |
| 222 | 215 |
| 223 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ | 216 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ |
| OLD | NEW |