| 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 #include "net/url_request/url_request_context_storage.h" | 5 #include "net/url_request/url_request_context_storage.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/base/network_delegate.h" | 8 #include "net/base/network_delegate.h" |
| 9 #include "net/base/sdch_manager.h" | 9 #include "net/base/sdch_manager.h" |
| 10 #include "net/cert/cert_verifier.h" | 10 #include "net/cert/cert_verifier.h" |
| 11 #include "net/cookies/cookie_store.h" | 11 #include "net/cookies/cookie_store.h" |
| 12 #include "net/dns/host_resolver.h" | 12 #include "net/dns/host_resolver.h" |
| 13 #include "net/ftp/ftp_transaction_factory.h" | 13 #include "net/ftp/ftp_transaction_factory.h" |
| 14 #include "net/http/http_auth_handler_factory.h" | 14 #include "net/http/http_auth_handler_factory.h" |
| 15 #include "net/http/http_server_properties.h" | 15 #include "net/http/http_server_properties.h" |
| 16 #include "net/http/http_transaction_factory.h" | 16 #include "net/http/http_transaction_factory.h" |
| 17 #include "net/log/net_log.h" | 17 #include "net/log/net_log.h" |
| 18 #include "net/proxy/proxy_service.h" | 18 #include "net/proxy/proxy_service.h" |
| 19 #include "net/ssl/channel_id_service.h" | 19 #include "net/ssl/channel_id_service.h" |
| 20 #include "net/url_request/fraudulent_certificate_reporter.h" | |
| 21 #include "net/url_request/http_user_agent_settings.h" | 20 #include "net/url_request/http_user_agent_settings.h" |
| 22 #include "net/url_request/url_request_backoff_manager.h" | 21 #include "net/url_request/url_request_backoff_manager.h" |
| 23 #include "net/url_request/url_request_context.h" | 22 #include "net/url_request/url_request_context.h" |
| 24 #include "net/url_request/url_request_job_factory.h" | 23 #include "net/url_request/url_request_job_factory.h" |
| 25 #include "net/url_request/url_request_throttler_manager.h" | 24 #include "net/url_request/url_request_throttler_manager.h" |
| 26 | 25 |
| 27 namespace net { | 26 namespace net { |
| 28 | 27 |
| 29 URLRequestContextStorage::URLRequestContextStorage(URLRequestContext* context) | 28 URLRequestContextStorage::URLRequestContextStorage(URLRequestContext* context) |
| 30 : context_(context) { | 29 : context_(context) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 48 context_->set_cert_verifier(cert_verifier); | 47 context_->set_cert_verifier(cert_verifier); |
| 49 cert_verifier_.reset(cert_verifier); | 48 cert_verifier_.reset(cert_verifier); |
| 50 } | 49 } |
| 51 | 50 |
| 52 void URLRequestContextStorage::set_channel_id_service( | 51 void URLRequestContextStorage::set_channel_id_service( |
| 53 scoped_ptr<ChannelIDService> channel_id_service) { | 52 scoped_ptr<ChannelIDService> channel_id_service) { |
| 54 context_->set_channel_id_service(channel_id_service.get()); | 53 context_->set_channel_id_service(channel_id_service.get()); |
| 55 channel_id_service_ = channel_id_service.Pass(); | 54 channel_id_service_ = channel_id_service.Pass(); |
| 56 } | 55 } |
| 57 | 56 |
| 58 void URLRequestContextStorage::set_fraudulent_certificate_reporter( | |
| 59 FraudulentCertificateReporter* fraudulent_certificate_reporter) { | |
| 60 context_->set_fraudulent_certificate_reporter( | |
| 61 fraudulent_certificate_reporter); | |
| 62 fraudulent_certificate_reporter_.reset(fraudulent_certificate_reporter); | |
| 63 } | |
| 64 | |
| 65 void URLRequestContextStorage::set_http_auth_handler_factory( | 57 void URLRequestContextStorage::set_http_auth_handler_factory( |
| 66 HttpAuthHandlerFactory* http_auth_handler_factory) { | 58 HttpAuthHandlerFactory* http_auth_handler_factory) { |
| 67 context_->set_http_auth_handler_factory(http_auth_handler_factory); | 59 context_->set_http_auth_handler_factory(http_auth_handler_factory); |
| 68 http_auth_handler_factory_.reset(http_auth_handler_factory); | 60 http_auth_handler_factory_.reset(http_auth_handler_factory); |
| 69 } | 61 } |
| 70 | 62 |
| 71 void URLRequestContextStorage::set_proxy_service(ProxyService* proxy_service) { | 63 void URLRequestContextStorage::set_proxy_service(ProxyService* proxy_service) { |
| 72 context_->set_proxy_service(proxy_service); | 64 context_->set_proxy_service(proxy_service); |
| 73 proxy_service_.reset(proxy_service); | 65 proxy_service_.reset(proxy_service); |
| 74 } | 66 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 http_user_agent_settings_.reset(http_user_agent_settings); | 124 http_user_agent_settings_.reset(http_user_agent_settings); |
| 133 } | 125 } |
| 134 | 126 |
| 135 void URLRequestContextStorage::set_sdch_manager( | 127 void URLRequestContextStorage::set_sdch_manager( |
| 136 scoped_ptr<SdchManager> sdch_manager) { | 128 scoped_ptr<SdchManager> sdch_manager) { |
| 137 context_->set_sdch_manager(sdch_manager.get()); | 129 context_->set_sdch_manager(sdch_manager.get()); |
| 138 sdch_manager_ = sdch_manager.Pass(); | 130 sdch_manager_ = sdch_manager.Pass(); |
| 139 } | 131 } |
| 140 | 132 |
| 141 } // namespace net | 133 } // namespace net |
| OLD | NEW |