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 "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 if (!http_transaction_factory()) { | 137 if (!http_transaction_factory()) { |
138 context_storage_.set_http_transaction_factory(new net::HttpCache( | 138 context_storage_.set_http_transaction_factory(new net::HttpCache( |
139 new net::HttpNetworkSession(params), | 139 new net::HttpNetworkSession(params), |
140 net::HttpCache::DefaultBackend::InMemory(0))); | 140 net::HttpCache::DefaultBackend::InMemory(0))); |
141 } | 141 } |
142 // In-memory cookie store. | 142 // In-memory cookie store. |
143 if (!cookie_store()) | 143 if (!cookie_store()) |
144 context_storage_.set_cookie_store(new net::CookieMonster(NULL, NULL)); | 144 context_storage_.set_cookie_store(new net::CookieMonster(NULL, NULL)); |
145 // In-memory origin bound cert service. | 145 // In-memory origin bound cert service. |
146 if (!origin_bound_cert_service()) { | 146 if (!server_bound_cert_service()) { |
147 context_storage_.set_origin_bound_cert_service( | 147 context_storage_.set_server_bound_cert_service( |
148 new net::OriginBoundCertService( | 148 new net::ServerBoundCertService( |
149 new net::DefaultOriginBoundCertStore(NULL))); | 149 new net::DefaultServerBoundCertStore(NULL))); |
150 } | 150 } |
151 if (accept_language().empty()) | 151 if (accept_language().empty()) |
152 set_accept_language("en-us,fr"); | 152 set_accept_language("en-us,fr"); |
153 if (accept_charset().empty()) | 153 if (accept_charset().empty()) |
154 set_accept_charset("iso-8859-1,*,utf-8"); | 154 set_accept_charset("iso-8859-1,*,utf-8"); |
155 if (!job_factory()) | 155 if (!job_factory()) |
156 context_storage_.set_job_factory(new net::URLRequestJobFactory); | 156 context_storage_.set_job_factory(new net::URLRequestJobFactory); |
157 } | 157 } |
158 | 158 |
159 | 159 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 535 |
536 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { | 536 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { |
537 DCHECK_EQ(value_, new_value_); | 537 DCHECK_EQ(value_, new_value_); |
538 value_ = old_value_; | 538 value_ = old_value_; |
539 } | 539 } |
540 | 540 |
541 // static | 541 // static |
542 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { | 542 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { |
543 return value_; | 543 return value_; |
544 } | 544 } |
OLD | NEW |