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_test_util.h" | 5 #include "net/url_request/url_request_test_util.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 params.proxy_service = proxy_service(); | 128 params.proxy_service = proxy_service(); |
129 params.ssl_config_service = ssl_config_service(); | 129 params.ssl_config_service = ssl_config_service(); |
130 params.http_auth_handler_factory = http_auth_handler_factory(); | 130 params.http_auth_handler_factory = http_auth_handler_factory(); |
131 params.http_server_properties = http_server_properties(); | 131 params.http_server_properties = http_server_properties(); |
132 params.net_log = net_log(); | 132 params.net_log = net_log(); |
133 params.channel_id_service = channel_id_service(); | 133 params.channel_id_service = channel_id_service(); |
134 context_storage_.set_http_network_session( | 134 context_storage_.set_http_network_session( |
135 base::MakeUnique<HttpNetworkSession>(params)); | 135 base::MakeUnique<HttpNetworkSession>(params)); |
136 context_storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>( | 136 context_storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>( |
137 context_storage_.http_network_session(), | 137 context_storage_.http_network_session(), |
138 HttpCache::DefaultBackend::InMemory(0), false)); | 138 HttpCache::DefaultBackend::InMemory(0), true /* is_main_cache */)); |
139 } | 139 } |
140 if (!http_user_agent_settings()) { | 140 if (!http_user_agent_settings()) { |
141 context_storage_.set_http_user_agent_settings( | 141 context_storage_.set_http_user_agent_settings( |
142 base::MakeUnique<StaticHttpUserAgentSettings>("en-us,fr", | 142 base::MakeUnique<StaticHttpUserAgentSettings>("en-us,fr", |
143 std::string())); | 143 std::string())); |
144 } | 144 } |
145 if (!job_factory()) { | 145 if (!job_factory()) { |
146 context_storage_.set_job_factory( | 146 context_storage_.set_job_factory( |
147 base::MakeUnique<URLRequestJobFactoryImpl>()); | 147 base::MakeUnique<URLRequestJobFactoryImpl>()); |
148 } | 148 } |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 NetworkDelegate* network_delegate) const { | 673 NetworkDelegate* network_delegate) const { |
674 return main_intercept_job_.release(); | 674 return main_intercept_job_.release(); |
675 } | 675 } |
676 | 676 |
677 void TestJobInterceptor::set_main_intercept_job( | 677 void TestJobInterceptor::set_main_intercept_job( |
678 std::unique_ptr<URLRequestJob> job) { | 678 std::unique_ptr<URLRequestJob> job) { |
679 main_intercept_job_ = std::move(job); | 679 main_intercept_job_ = std::move(job); |
680 } | 680 } |
681 | 681 |
682 } // namespace net | 682 } // namespace net |
OLD | NEW |