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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 context_storage_.set_cookie_store(new CookieMonster(NULL, NULL)); | 117 context_storage_.set_cookie_store(new CookieMonster(NULL, NULL)); |
118 // In-memory origin bound cert service. | 118 // In-memory origin bound cert service. |
119 if (!server_bound_cert_service()) { | 119 if (!server_bound_cert_service()) { |
120 context_storage_.set_server_bound_cert_service( | 120 context_storage_.set_server_bound_cert_service( |
121 new ServerBoundCertService( | 121 new ServerBoundCertService( |
122 new DefaultServerBoundCertStore(NULL), | 122 new DefaultServerBoundCertStore(NULL), |
123 base::WorkerPool::GetTaskRunner(true))); | 123 base::WorkerPool::GetTaskRunner(true))); |
124 } | 124 } |
125 if (!http_user_agent_settings()) { | 125 if (!http_user_agent_settings()) { |
126 context_storage_.set_http_user_agent_settings( | 126 context_storage_.set_http_user_agent_settings( |
127 new StaticHttpUserAgentSettings( | 127 new StaticHttpUserAgentSettings("en-us,fr", EmptyString())); |
128 "en-us,fr", "iso-8859-1,*,utf-8", EmptyString())); | |
129 } | 128 } |
130 if (!job_factory()) | 129 if (!job_factory()) |
131 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); | 130 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); |
132 } | 131 } |
133 | 132 |
134 TestURLRequest::TestURLRequest(const GURL& url, | 133 TestURLRequest::TestURLRequest(const GURL& url, |
135 Delegate* delegate, | 134 Delegate* delegate, |
136 TestURLRequestContext* context) | 135 TestURLRequestContext* context) |
137 : URLRequest(url, delegate, context, context->network_delegate()) { | 136 : URLRequest(url, delegate, context, context->network_delegate()) { |
138 } | 137 } |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 URLRequestJob* job = main_intercept_job_; | 592 URLRequestJob* job = main_intercept_job_; |
594 main_intercept_job_ = NULL; | 593 main_intercept_job_ = NULL; |
595 return job; | 594 return job; |
596 } | 595 } |
597 | 596 |
598 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { | 597 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { |
599 main_intercept_job_ = job; | 598 main_intercept_job_ = job; |
600 } | 599 } |
601 | 600 |
602 } // namespace net | 601 } // namespace net |
OLD | NEW |