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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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", EmptyString())); |
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 Delegate* delegate, | 131 Delegate* delegate, |
131 TestURLRequestContext* context, | 132 TestURLRequestContext* context) |
132 NetworkDelegate* network_delegate) | 133 : URLRequest(url, priority, delegate, context) {} |
133 : URLRequest(url, delegate, context, network_delegate) { | |
134 } | |
135 | 134 |
136 TestURLRequest::~TestURLRequest() { | 135 TestURLRequest::~TestURLRequest() { |
137 } | 136 } |
138 | 137 |
139 TestURLRequestContextGetter::TestURLRequestContextGetter( | 138 TestURLRequestContextGetter::TestURLRequestContextGetter( |
140 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner) | 139 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner) |
141 : network_task_runner_(network_task_runner) { | 140 : network_task_runner_(network_task_runner) { |
142 DCHECK(network_task_runner_.get()); | 141 DCHECK(network_task_runner_.get()); |
143 } | 142 } |
144 | 143 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 URLRequestJob* job = main_intercept_job_; | 597 URLRequestJob* job = main_intercept_job_; |
599 main_intercept_job_ = NULL; | 598 main_intercept_job_ = NULL; |
600 return job; | 599 return job; |
601 } | 600 } |
602 | 601 |
603 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { | 602 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { |
604 main_intercept_job_ = job; | 603 main_intercept_job_ = job; |
605 } | 604 } |
606 | 605 |
607 } // namespace net | 606 } // namespace net |
OLD | NEW |