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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 new StaticHttpUserAgentSettings("en-us,fr", std::string())); | 127 new StaticHttpUserAgentSettings("en-us,fr", std::string())); |
128 } | 128 } |
129 if (!job_factory()) | 129 if (!job_factory()) |
130 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); | 130 context_storage_.set_job_factory(new URLRequestJobFactoryImpl); |
131 } | 131 } |
132 | 132 |
133 TestURLRequest::TestURLRequest(const GURL& url, | 133 TestURLRequest::TestURLRequest(const GURL& url, |
134 RequestPriority priority, | 134 RequestPriority priority, |
135 Delegate* delegate, | 135 Delegate* delegate, |
136 TestURLRequestContext* context) | 136 TestURLRequestContext* context) |
137 : URLRequest(url, priority, delegate, context) {} | 137 : URLRequest(url, priority, delegate, context, context->cookie_store(), |
| 138 context->network_delegate()) { |
| 139 } |
138 | 140 |
139 TestURLRequest::~TestURLRequest() { | 141 TestURLRequest::~TestURLRequest() { |
140 } | 142 } |
141 | 143 |
142 TestURLRequestContextGetter::TestURLRequestContextGetter( | 144 TestURLRequestContextGetter::TestURLRequestContextGetter( |
143 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner) | 145 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner) |
144 : network_task_runner_(network_task_runner) { | 146 : network_task_runner_(network_task_runner) { |
145 DCHECK(network_task_runner_.get()); | 147 DCHECK(network_task_runner_.get()); |
146 } | 148 } |
147 | 149 |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 URLRequestJob* job = main_intercept_job_; | 644 URLRequestJob* job = main_intercept_job_; |
643 main_intercept_job_ = NULL; | 645 main_intercept_job_ = NULL; |
644 return job; | 646 return job; |
645 } | 647 } |
646 | 648 |
647 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { | 649 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { |
648 main_intercept_job_ = job; | 650 main_intercept_job_ = job; |
649 } | 651 } |
650 | 652 |
651 } // namespace net | 653 } // namespace net |
OLD | NEW |