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 26 matching lines...) Expand all Loading... |
37 class CookieStore; | 37 class CookieStore; |
38 class CTPolicyEnforcer; | 38 class CTPolicyEnforcer; |
39 class CTVerifier; | 39 class CTVerifier; |
40 class HostResolver; | 40 class HostResolver; |
41 class HttpAuthHandlerFactory; | 41 class HttpAuthHandlerFactory; |
42 class HttpTransactionFactory; | 42 class HttpTransactionFactory; |
43 class HttpUserAgentSettings; | 43 class HttpUserAgentSettings; |
44 class NetLog; | 44 class NetLog; |
45 class NetworkDelegate; | 45 class NetworkDelegate; |
46 class NetworkQualityEstimator; | 46 class NetworkQualityEstimator; |
| 47 class ReportingService; |
47 class SdchManager; | 48 class SdchManager; |
48 class ProxyService; | 49 class ProxyService; |
49 class URLRequest; | 50 class URLRequest; |
50 class URLRequestBackoffManager; | 51 class URLRequestBackoffManager; |
51 class URLRequestJobFactory; | 52 class URLRequestJobFactory; |
52 class URLRequestThrottlerManager; | 53 class URLRequestThrottlerManager; |
53 | 54 |
54 // Subclass to provide application-specific context for URLRequest | 55 // Subclass to provide application-specific context for URLRequest |
55 // instances. URLRequestContext does not own these member variables, since they | 56 // instances. URLRequestContext does not own these member variables, since they |
56 // may be shared with other contexts. URLRequestContextStorage can be used for | 57 // may be shared with other contexts. URLRequestContextStorage can be used for |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 // Gets the NetworkQualityEstimator associated with this context. | 228 // Gets the NetworkQualityEstimator associated with this context. |
228 // May return nullptr. | 229 // May return nullptr. |
229 NetworkQualityEstimator* network_quality_estimator() const { | 230 NetworkQualityEstimator* network_quality_estimator() const { |
230 return network_quality_estimator_; | 231 return network_quality_estimator_; |
231 } | 232 } |
232 void set_network_quality_estimator( | 233 void set_network_quality_estimator( |
233 NetworkQualityEstimator* network_quality_estimator) { | 234 NetworkQualityEstimator* network_quality_estimator) { |
234 network_quality_estimator_ = network_quality_estimator; | 235 network_quality_estimator_ = network_quality_estimator; |
235 } | 236 } |
236 | 237 |
| 238 ReportingService* reporting_service() const { return reporting_service_; } |
| 239 void set_reporting_service(ReportingService* reporting_service) { |
| 240 reporting_service_ = reporting_service; |
| 241 } |
| 242 |
237 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } | 243 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } |
238 | 244 |
239 bool enable_brotli() const { return enable_brotli_; } | 245 bool enable_brotli() const { return enable_brotli_; } |
240 | 246 |
241 // Sets the |check_cleartext_permitted| flag, which controls whether to check | 247 // Sets the |check_cleartext_permitted| flag, which controls whether to check |
242 // system policy before allowing a cleartext http or ws request. | 248 // system policy before allowing a cleartext http or ws request. |
243 void set_check_cleartext_permitted(bool check_cleartext_permitted) { | 249 void set_check_cleartext_permitted(bool check_cleartext_permitted) { |
244 check_cleartext_permitted_ = check_cleartext_permitted; | 250 check_cleartext_permitted_ = check_cleartext_permitted; |
245 } | 251 } |
246 | 252 |
(...skipping 24 matching lines...) Expand all Loading... |
271 HttpAuthHandlerFactory* http_auth_handler_factory_; | 277 HttpAuthHandlerFactory* http_auth_handler_factory_; |
272 ProxyService* proxy_service_; | 278 ProxyService* proxy_service_; |
273 scoped_refptr<SSLConfigService> ssl_config_service_; | 279 scoped_refptr<SSLConfigService> ssl_config_service_; |
274 NetworkDelegate* network_delegate_; | 280 NetworkDelegate* network_delegate_; |
275 HttpServerProperties* http_server_properties_; | 281 HttpServerProperties* http_server_properties_; |
276 HttpUserAgentSettings* http_user_agent_settings_; | 282 HttpUserAgentSettings* http_user_agent_settings_; |
277 CookieStore* cookie_store_; | 283 CookieStore* cookie_store_; |
278 TransportSecurityState* transport_security_state_; | 284 TransportSecurityState* transport_security_state_; |
279 CTVerifier* cert_transparency_verifier_; | 285 CTVerifier* cert_transparency_verifier_; |
280 CTPolicyEnforcer* ct_policy_enforcer_; | 286 CTPolicyEnforcer* ct_policy_enforcer_; |
| 287 ReportingService* reporting_service_; |
281 HttpTransactionFactory* http_transaction_factory_; | 288 HttpTransactionFactory* http_transaction_factory_; |
282 const URLRequestJobFactory* job_factory_; | 289 const URLRequestJobFactory* job_factory_; |
283 URLRequestThrottlerManager* throttler_manager_; | 290 URLRequestThrottlerManager* throttler_manager_; |
284 URLRequestBackoffManager* backoff_manager_; | 291 URLRequestBackoffManager* backoff_manager_; |
285 SdchManager* sdch_manager_; | 292 SdchManager* sdch_manager_; |
286 NetworkQualityEstimator* network_quality_estimator_; | 293 NetworkQualityEstimator* network_quality_estimator_; |
287 | 294 |
288 // --------------------------------------------------------------------------- | 295 // --------------------------------------------------------------------------- |
289 // Important: When adding any new members below, consider whether they need to | 296 // Important: When adding any new members below, consider whether they need to |
290 // be added to CopyFrom. | 297 // be added to CopyFrom. |
(...skipping 11 matching lines...) Expand all Loading... |
302 // Used in MemoryDumpProvier to annotate memory usage. The name does not need | 309 // Used in MemoryDumpProvier to annotate memory usage. The name does not need |
303 // to be unique. | 310 // to be unique. |
304 std::string name_; | 311 std::string name_; |
305 | 312 |
306 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 313 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
307 }; | 314 }; |
308 | 315 |
309 } // namespace net | 316 } // namespace net |
310 | 317 |
311 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 318 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |