Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: net/url_request/url_request_test_util.cc

Issue 51953002: [Net] Add a priority parameter to URLRequest's constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_throttler_simulation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698