| 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 // This class represents contextual information (cookies, cache, etc.) | 5 // This class represents contextual information (cookies, cache, etc.) |
| 6 // that's necessary when processing resource requests. | 6 // that's necessary when processing resource requests. |
| 7 | 7 |
| 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 class CookieStore; | 38 class CookieStore; |
| 39 class CTPolicyEnforcer; | 39 class CTPolicyEnforcer; |
| 40 class CTVerifier; | 40 class CTVerifier; |
| 41 class HostResolver; | 41 class HostResolver; |
| 42 class HttpAuthHandlerFactory; | 42 class HttpAuthHandlerFactory; |
| 43 class HttpTransactionFactory; | 43 class HttpTransactionFactory; |
| 44 class HttpUserAgentSettings; | 44 class HttpUserAgentSettings; |
| 45 class NetLog; | 45 class NetLog; |
| 46 class NetworkDelegate; | 46 class NetworkDelegate; |
| 47 class NetworkQualityEstimator; | 47 class NetworkQualityEstimator; |
| 48 class ReportingService; |
| 48 class SdchManager; | 49 class SdchManager; |
| 49 class ProxyService; | 50 class ProxyService; |
| 50 class URLRequest; | 51 class URLRequest; |
| 51 class URLRequestBackoffManager; | 52 class URLRequestBackoffManager; |
| 52 class URLRequestJobFactory; | 53 class URLRequestJobFactory; |
| 53 class URLRequestThrottlerManager; | 54 class URLRequestThrottlerManager; |
| 54 | 55 |
| 55 // Subclass to provide application-specific context for URLRequest | 56 // Subclass to provide application-specific context for URLRequest |
| 56 // instances. URLRequestContext does not own these member variables, since they | 57 // instances. URLRequestContext does not own these member variables, since they |
| 57 // may be shared with other contexts. URLRequestContextStorage can be used for | 58 // may be shared with other contexts. URLRequestContextStorage can be used for |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // Gets the NetworkQualityEstimator associated with this context. | 243 // Gets the NetworkQualityEstimator associated with this context. |
| 243 // May return nullptr. | 244 // May return nullptr. |
| 244 NetworkQualityEstimator* network_quality_estimator() const { | 245 NetworkQualityEstimator* network_quality_estimator() const { |
| 245 return network_quality_estimator_; | 246 return network_quality_estimator_; |
| 246 } | 247 } |
| 247 void set_network_quality_estimator( | 248 void set_network_quality_estimator( |
| 248 NetworkQualityEstimator* network_quality_estimator) { | 249 NetworkQualityEstimator* network_quality_estimator) { |
| 249 network_quality_estimator_ = network_quality_estimator; | 250 network_quality_estimator_ = network_quality_estimator; |
| 250 } | 251 } |
| 251 | 252 |
| 253 ReportingService* reporting_service() const { return reporting_service_; } |
| 254 void set_reporting_service(ReportingService* reporting_service) { |
| 255 reporting_service_ = reporting_service; |
| 256 } |
| 257 |
| 252 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } | 258 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } |
| 253 | 259 |
| 254 bool enable_brotli() const { return enable_brotli_; } | 260 bool enable_brotli() const { return enable_brotli_; } |
| 255 | 261 |
| 256 // Sets the |check_cleartext_permitted| flag, which controls whether to check | 262 // Sets the |check_cleartext_permitted| flag, which controls whether to check |
| 257 // system policy before allowing a cleartext http or ws request. | 263 // system policy before allowing a cleartext http or ws request. |
| 258 void set_check_cleartext_permitted(bool check_cleartext_permitted) { | 264 void set_check_cleartext_permitted(bool check_cleartext_permitted) { |
| 259 check_cleartext_permitted_ = check_cleartext_permitted; | 265 check_cleartext_permitted_ = check_cleartext_permitted; |
| 260 } | 266 } |
| 261 | 267 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 292 CookieStore* cookie_store_; | 298 CookieStore* cookie_store_; |
| 293 TransportSecurityState* transport_security_state_; | 299 TransportSecurityState* transport_security_state_; |
| 294 CTVerifier* cert_transparency_verifier_; | 300 CTVerifier* cert_transparency_verifier_; |
| 295 CTPolicyEnforcer* ct_policy_enforcer_; | 301 CTPolicyEnforcer* ct_policy_enforcer_; |
| 296 HttpTransactionFactory* http_transaction_factory_; | 302 HttpTransactionFactory* http_transaction_factory_; |
| 297 const URLRequestJobFactory* job_factory_; | 303 const URLRequestJobFactory* job_factory_; |
| 298 URLRequestThrottlerManager* throttler_manager_; | 304 URLRequestThrottlerManager* throttler_manager_; |
| 299 URLRequestBackoffManager* backoff_manager_; | 305 URLRequestBackoffManager* backoff_manager_; |
| 300 SdchManager* sdch_manager_; | 306 SdchManager* sdch_manager_; |
| 301 NetworkQualityEstimator* network_quality_estimator_; | 307 NetworkQualityEstimator* network_quality_estimator_; |
| 308 ReportingService* reporting_service_; |
| 302 | 309 |
| 303 // --------------------------------------------------------------------------- | 310 // --------------------------------------------------------------------------- |
| 304 // Important: When adding any new members below, consider whether they need to | 311 // Important: When adding any new members below, consider whether they need to |
| 305 // be added to CopyFrom. | 312 // be added to CopyFrom. |
| 306 // --------------------------------------------------------------------------- | 313 // --------------------------------------------------------------------------- |
| 307 | 314 |
| 308 std::unique_ptr<std::set<const URLRequest*>> url_requests_; | 315 std::unique_ptr<std::set<const URLRequest*>> url_requests_; |
| 309 | 316 |
| 310 // Enables Brotli Content-Encoding support. | 317 // Enables Brotli Content-Encoding support. |
| 311 bool enable_brotli_; | 318 bool enable_brotli_; |
| 312 // Enables checking system policy before allowing a cleartext http or ws | 319 // Enables checking system policy before allowing a cleartext http or ws |
| 313 // request. Only used on Android. | 320 // request. Only used on Android. |
| 314 bool check_cleartext_permitted_; | 321 bool check_cleartext_permitted_; |
| 315 | 322 |
| 316 // An optional name which can be set to describe this URLRequestContext. | 323 // An optional name which can be set to describe this URLRequestContext. |
| 317 // Used in MemoryDumpProvier to annotate memory usage. The name does not need | 324 // Used in MemoryDumpProvier to annotate memory usage. The name does not need |
| 318 // to be unique. | 325 // to be unique. |
| 319 const char* name_; | 326 const char* name_; |
| 320 | 327 |
| 321 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 328 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 322 }; | 329 }; |
| 323 | 330 |
| 324 } // namespace net | 331 } // namespace net |
| 325 | 332 |
| 326 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 333 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |