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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "net/base/network_delegate.h" | 10 #include "net/base/network_delegate.h" |
11 #include "net/base/proxy_delegate.h" | 11 #include "net/base/proxy_delegate.h" |
12 #include "net/base/sdch_manager.h" | 12 #include "net/base/sdch_manager.h" |
13 #include "net/cert/cert_verifier.h" | 13 #include "net/cert/cert_verifier.h" |
14 #include "net/cert/ct_policy_enforcer.h" | 14 #include "net/cert/ct_policy_enforcer.h" |
15 #include "net/cert/ct_verifier.h" | 15 #include "net/cert/ct_verifier.h" |
16 #include "net/cookies/cookie_store.h" | 16 #include "net/cookies/cookie_store.h" |
17 #include "net/dns/host_resolver.h" | 17 #include "net/dns/host_resolver.h" |
18 #include "net/http/http_auth_handler_factory.h" | 18 #include "net/http/http_auth_handler_factory.h" |
19 #include "net/http/http_server_properties.h" | 19 #include "net/http/http_server_properties.h" |
20 #include "net/http/http_transaction_factory.h" | 20 #include "net/http/http_transaction_factory.h" |
21 #include "net/log/net_log.h" | 21 #include "net/log/net_log.h" |
22 #include "net/proxy/proxy_service.h" | 22 #include "net/proxy/proxy_service.h" |
| 23 #include "net/reporting/reporting_service.h" |
23 #include "net/ssl/channel_id_service.h" | 24 #include "net/ssl/channel_id_service.h" |
24 #include "net/url_request/http_user_agent_settings.h" | 25 #include "net/url_request/http_user_agent_settings.h" |
25 #include "net/url_request/url_request_context.h" | 26 #include "net/url_request/url_request_context.h" |
26 #include "net/url_request/url_request_job_factory.h" | 27 #include "net/url_request/url_request_job_factory.h" |
27 #include "net/url_request/url_request_throttler_manager.h" | 28 #include "net/url_request/url_request_throttler_manager.h" |
28 | 29 |
29 namespace net { | 30 namespace net { |
30 | 31 |
31 URLRequestContextStorage::URLRequestContextStorage(URLRequestContext* context) | 32 URLRequestContextStorage::URLRequestContextStorage(URLRequestContext* context) |
32 : context_(context) { | 33 : context_(context) { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 context_->set_cert_transparency_verifier(cert_transparency_verifier.get()); | 111 context_->set_cert_transparency_verifier(cert_transparency_verifier.get()); |
111 cert_transparency_verifier_ = std::move(cert_transparency_verifier); | 112 cert_transparency_verifier_ = std::move(cert_transparency_verifier); |
112 } | 113 } |
113 | 114 |
114 void URLRequestContextStorage::set_ct_policy_enforcer( | 115 void URLRequestContextStorage::set_ct_policy_enforcer( |
115 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer) { | 116 std::unique_ptr<CTPolicyEnforcer> ct_policy_enforcer) { |
116 context_->set_ct_policy_enforcer(ct_policy_enforcer.get()); | 117 context_->set_ct_policy_enforcer(ct_policy_enforcer.get()); |
117 ct_policy_enforcer_ = std::move(ct_policy_enforcer); | 118 ct_policy_enforcer_ = std::move(ct_policy_enforcer); |
118 } | 119 } |
119 | 120 |
| 121 void URLRequestContextStorage::set_reporting_service( |
| 122 std::unique_ptr<ReportingService> reporting_service) { |
| 123 context_->set_reporting_service(reporting_service.get()); |
| 124 reporting_service_ = std::move(reporting_service); |
| 125 } |
| 126 |
120 void URLRequestContextStorage::set_http_network_session( | 127 void URLRequestContextStorage::set_http_network_session( |
121 std::unique_ptr<HttpNetworkSession> http_network_session) { | 128 std::unique_ptr<HttpNetworkSession> http_network_session) { |
122 http_network_session_ = std::move(http_network_session); | 129 http_network_session_ = std::move(http_network_session); |
123 } | 130 } |
124 | 131 |
125 void URLRequestContextStorage::set_http_transaction_factory( | 132 void URLRequestContextStorage::set_http_transaction_factory( |
126 std::unique_ptr<HttpTransactionFactory> http_transaction_factory) { | 133 std::unique_ptr<HttpTransactionFactory> http_transaction_factory) { |
127 context_->set_http_transaction_factory(http_transaction_factory.get()); | 134 context_->set_http_transaction_factory(http_transaction_factory.get()); |
128 http_transaction_factory_ = std::move(http_transaction_factory); | 135 http_transaction_factory_ = std::move(http_transaction_factory); |
129 } | 136 } |
(...skipping 16 matching lines...) Expand all Loading... |
146 http_user_agent_settings_ = std::move(http_user_agent_settings); | 153 http_user_agent_settings_ = std::move(http_user_agent_settings); |
147 } | 154 } |
148 | 155 |
149 void URLRequestContextStorage::set_sdch_manager( | 156 void URLRequestContextStorage::set_sdch_manager( |
150 std::unique_ptr<SdchManager> sdch_manager) { | 157 std::unique_ptr<SdchManager> sdch_manager) { |
151 context_->set_sdch_manager(sdch_manager.get()); | 158 context_->set_sdch_manager(sdch_manager.get()); |
152 sdch_manager_ = std::move(sdch_manager); | 159 sdch_manager_ = std::move(sdch_manager); |
153 } | 160 } |
154 | 161 |
155 } // namespace net | 162 } // namespace net |
OLD | NEW |