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