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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 context_storage_.set_cookie_store(new CookieMonster(NULL, NULL)); | 113 context_storage_.set_cookie_store(new CookieMonster(NULL, NULL)); |
114 // In-memory origin bound cert service. | 114 // In-memory origin bound cert service. |
115 if (!server_bound_cert_service()) { | 115 if (!server_bound_cert_service()) { |
116 context_storage_.set_server_bound_cert_service( | 116 context_storage_.set_server_bound_cert_service( |
117 new ServerBoundCertService( | 117 new ServerBoundCertService( |
118 new DefaultServerBoundCertStore(NULL), | 118 new DefaultServerBoundCertStore(NULL), |
119 base::WorkerPool::GetTaskRunner(true))); | 119 base::WorkerPool::GetTaskRunner(true))); |
120 } | 120 } |
121 if (!http_user_agent_settings()) { | 121 if (!http_user_agent_settings()) { |
122 context_storage_.set_http_user_agent_settings( | 122 context_storage_.set_http_user_agent_settings( |
123 new StaticHttpUserAgentSettings("en-us,fr", EmptyString())); | 123 new StaticHttpUserAgentSettings("en-us,fr", std::string())); |
124 } | 124 } |
125 if (!job_factory()) | 125 if (!job_factory()) |
126 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); | 126 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); |
127 } | 127 } |
128 | 128 |
129 TestURLRequest::TestURLRequest(const GURL& url, | 129 TestURLRequest::TestURLRequest(const GURL& url, |
130 RequestPriority priority, | 130 RequestPriority priority, |
131 Delegate* delegate, | 131 Delegate* delegate, |
132 TestURLRequestContext* context) | 132 TestURLRequestContext* context) |
133 : URLRequest(url, priority, delegate, context) {} | 133 : URLRequest(url, priority, delegate, context) {} |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 URLRequestJob* job = main_intercept_job_; | 608 URLRequestJob* job = main_intercept_job_; |
609 main_intercept_job_ = NULL; | 609 main_intercept_job_ = NULL; |
610 return job; | 610 return job; |
611 } | 611 } |
612 | 612 |
613 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { | 613 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { |
614 main_intercept_job_ = job; | 614 main_intercept_job_ = job; |
615 } | 615 } |
616 | 616 |
617 } // namespace net | 617 } // namespace net |
OLD | NEW |