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

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

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_throttler_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <utility>
8
7 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
8 #include "base/location.h" 10 #include "base/location.h"
9 #include "base/logging.h" 11 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
11 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
12 #include "base/thread_task_runner_handle.h" 14 #include "base/thread_task_runner_handle.h"
13 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
14 #include "base/threading/worker_pool.h" 16 #include "base/threading/worker_pool.h"
15 #include "net/base/host_port_pair.h" 17 #include "net/base/host_port_pair.h"
16 #include "net/cert/cert_verifier.h" 18 #include "net/cert/cert_verifier.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 138
137 TestURLRequestContextGetter::TestURLRequestContextGetter( 139 TestURLRequestContextGetter::TestURLRequestContextGetter(
138 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner) 140 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner)
139 : network_task_runner_(network_task_runner) { 141 : network_task_runner_(network_task_runner) {
140 DCHECK(network_task_runner_.get()); 142 DCHECK(network_task_runner_.get());
141 } 143 }
142 144
143 TestURLRequestContextGetter::TestURLRequestContextGetter( 145 TestURLRequestContextGetter::TestURLRequestContextGetter(
144 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner, 146 const scoped_refptr<base::SingleThreadTaskRunner>& network_task_runner,
145 scoped_ptr<TestURLRequestContext> context) 147 scoped_ptr<TestURLRequestContext> context)
146 : network_task_runner_(network_task_runner), context_(context.Pass()) { 148 : network_task_runner_(network_task_runner), context_(std::move(context)) {
147 DCHECK(network_task_runner_.get()); 149 DCHECK(network_task_runner_.get());
148 } 150 }
149 151
150 TestURLRequestContextGetter::~TestURLRequestContextGetter() {} 152 TestURLRequestContextGetter::~TestURLRequestContextGetter() {}
151 153
152 TestURLRequestContext* TestURLRequestContextGetter::GetURLRequestContext() { 154 TestURLRequestContext* TestURLRequestContextGetter::GetURLRequestContext() {
153 if (!context_.get()) 155 if (!context_.get())
154 context_.reset(new TestURLRequestContext); 156 context_.reset(new TestURLRequestContext);
155 return context_.get(); 157 return context_.get();
156 } 158 }
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 URLRequest* request, 648 URLRequest* request,
647 NetworkDelegate* network_delegate) const { 649 NetworkDelegate* network_delegate) const {
648 return main_intercept_job_.release(); 650 return main_intercept_job_.release();
649 } 651 }
650 652
651 void TestJobInterceptor::set_main_intercept_job(scoped_ptr<URLRequestJob> job) { 653 void TestJobInterceptor::set_main_intercept_job(scoped_ptr<URLRequestJob> job) {
652 main_intercept_job_ = std::move(job); 654 main_intercept_job_ = std::move(job);
653 } 655 }
654 656
655 } // namespace net 657 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_throttler_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698