| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "net/url_request/url_request_context.h" | 5 #include "net/url_request/url_request_context.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "net/base/cookie_store.h" | 9 #include "net/base/cookie_store.h" |
| 10 #include "net/base/host_resolver.h" | 10 #include "net/base/host_resolver.h" |
| 11 #include "net/ftp/ftp_transaction_factory.h" | 11 #include "net/ftp/ftp_transaction_factory.h" |
| 12 #include "net/http/http_transaction_factory.h" | 12 #include "net/http/http_transaction_factory.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 URLRequestContext::URLRequestContext() | 16 URLRequestContext::URLRequestContext() |
| 17 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), | 17 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), |
| 18 net_log_(NULL), | 18 net_log_(NULL), |
| 19 host_resolver_(NULL), | 19 host_resolver_(NULL), |
| 20 cert_verifier_(NULL), | 20 cert_verifier_(NULL), |
| 21 origin_bound_cert_service_(NULL), | 21 origin_bound_cert_service_(NULL), |
| 22 dnsrr_resolver_(NULL), | |
| 23 dns_cert_checker_(NULL), | 22 dns_cert_checker_(NULL), |
| 24 fraudulent_certificate_reporter_(NULL), | 23 fraudulent_certificate_reporter_(NULL), |
| 25 http_auth_handler_factory_(NULL), | 24 http_auth_handler_factory_(NULL), |
| 26 proxy_service_(NULL), | 25 proxy_service_(NULL), |
| 27 network_delegate_(NULL), | 26 network_delegate_(NULL), |
| 28 http_server_properties_(NULL), | 27 http_server_properties_(NULL), |
| 29 transport_security_state_(NULL), | 28 transport_security_state_(NULL), |
| 30 ftp_auth_cache_(new FtpAuthCache), | 29 ftp_auth_cache_(new FtpAuthCache), |
| 31 http_transaction_factory_(NULL), | 30 http_transaction_factory_(NULL), |
| 32 ftp_transaction_factory_(NULL), | 31 ftp_transaction_factory_(NULL), |
| 33 job_factory_(NULL) { | 32 job_factory_(NULL) { |
| 34 } | 33 } |
| 35 | 34 |
| 36 void URLRequestContext::CopyFrom(URLRequestContext* other) { | 35 void URLRequestContext::CopyFrom(URLRequestContext* other) { |
| 37 // Copy URLRequestContext parameters. | 36 // Copy URLRequestContext parameters. |
| 38 set_net_log(other->net_log()); | 37 set_net_log(other->net_log()); |
| 39 set_host_resolver(other->host_resolver()); | 38 set_host_resolver(other->host_resolver()); |
| 40 set_cert_verifier(other->cert_verifier()); | 39 set_cert_verifier(other->cert_verifier()); |
| 41 set_origin_bound_cert_service(other->origin_bound_cert_service()); | 40 set_origin_bound_cert_service(other->origin_bound_cert_service()); |
| 42 set_dnsrr_resolver(other->dnsrr_resolver()); | |
| 43 set_dns_cert_checker(other->dns_cert_checker()); | 41 set_dns_cert_checker(other->dns_cert_checker()); |
| 44 set_fraudulent_certificate_reporter(other->fraudulent_certificate_reporter()); | 42 set_fraudulent_certificate_reporter(other->fraudulent_certificate_reporter()); |
| 45 set_http_auth_handler_factory(other->http_auth_handler_factory()); | 43 set_http_auth_handler_factory(other->http_auth_handler_factory()); |
| 46 set_proxy_service(other->proxy_service()); | 44 set_proxy_service(other->proxy_service()); |
| 47 set_ssl_config_service(other->ssl_config_service()); | 45 set_ssl_config_service(other->ssl_config_service()); |
| 48 set_network_delegate(other->network_delegate()); | 46 set_network_delegate(other->network_delegate()); |
| 49 set_http_server_properties(other->http_server_properties()); | 47 set_http_server_properties(other->http_server_properties()); |
| 50 set_cookie_store(other->cookie_store()); | 48 set_cookie_store(other->cookie_store()); |
| 51 set_transport_security_state(other->transport_security_state()); | 49 set_transport_security_state(other->transport_security_state()); |
| 52 // FTPAuthCache is unique per context. | 50 // FTPAuthCache is unique per context. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 63 } | 61 } |
| 64 | 62 |
| 65 const std::string& URLRequestContext::GetUserAgent(const GURL& url) const { | 63 const std::string& URLRequestContext::GetUserAgent(const GURL& url) const { |
| 66 return EmptyString(); | 64 return EmptyString(); |
| 67 } | 65 } |
| 68 | 66 |
| 69 URLRequestContext::~URLRequestContext() { | 67 URLRequestContext::~URLRequestContext() { |
| 70 } | 68 } |
| 71 | 69 |
| 72 } // namespace net | 70 } // namespace net |
| OLD | NEW |