| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 new StaticHttpUserAgentSettings( | 127 new StaticHttpUserAgentSettings( |
| 128 "en-us,fr", "iso-8859-1,*,utf-8", EmptyString())); | 128 "en-us,fr", "iso-8859-1,*,utf-8", EmptyString())); |
| 129 } | 129 } |
| 130 if (!job_factory()) | 130 if (!job_factory()) |
| 131 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); | 131 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); |
| 132 } | 132 } |
| 133 | 133 |
| 134 TestURLRequest::TestURLRequest(const GURL& url, | 134 TestURLRequest::TestURLRequest(const GURL& url, |
| 135 Delegate* delegate, | 135 Delegate* delegate, |
| 136 TestURLRequestContext* context) | 136 TestURLRequestContext* context) |
| 137 : URLRequest(url, delegate, context) { | 137 : URLRequest(url, delegate, context, context->network_delegate()) { |
| 138 } |
| 139 |
| 140 TestURLRequest::TestURLRequest(const GURL& url, |
| 141 Delegate* delegate, |
| 142 TestURLRequestContext* context, |
| 143 NetworkDelegate* network_delegate) |
| 144 : URLRequest(url, delegate, context, network_delegate) { |
| 138 } | 145 } |
| 139 | 146 |
| 140 TestURLRequest::~TestURLRequest() { | 147 TestURLRequest::~TestURLRequest() { |
| 141 } | 148 } |
| 142 | 149 |
| 143 TestURLRequestContextGetter::TestURLRequestContextGetter( | 150 TestURLRequestContextGetter::TestURLRequestContextGetter( |
| 144 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner) | 151 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner) |
| 145 : network_task_runner_(network_task_runner) { | 152 : network_task_runner_(network_task_runner) { |
| 146 DCHECK(network_task_runner_); | 153 DCHECK(network_task_runner_); |
| 147 } | 154 } |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 URLRequestJob* job = main_intercept_job_; | 593 URLRequestJob* job = main_intercept_job_; |
| 587 main_intercept_job_ = NULL; | 594 main_intercept_job_ = NULL; |
| 588 return job; | 595 return job; |
| 589 } | 596 } |
| 590 | 597 |
| 591 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { | 598 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { |
| 592 main_intercept_job_ = job; | 599 main_intercept_job_ = job; |
| 593 } | 600 } |
| 594 | 601 |
| 595 } // namespace net | 602 } // namespace net |
| OLD | NEW |