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

Side by Side Diff: content/browser/loader/detachable_resource_handler.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/loader/detachable_resource_handler.h" 5 #include "content/browser/loader/detachable_resource_handler.h"
6 6
7 #include <utility>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/time/time.h" 10 #include "base/time/time.h"
9 #include "content/browser/loader/resource_request_info_impl.h" 11 #include "content/browser/loader/resource_request_info_impl.h"
10 #include "net/base/io_buffer.h" 12 #include "net/base/io_buffer.h"
11 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
12 #include "net/url_request/url_request.h" 14 #include "net/url_request/url_request.h"
13 #include "net/url_request/url_request_status.h" 15 #include "net/url_request/url_request_status.h"
14 16
15 namespace { 17 namespace {
16 // This matches the maximum allocation size of AsyncResourceHandler. 18 // This matches the maximum allocation size of AsyncResourceHandler.
17 const int kReadBufSize = 32 * 1024; 19 const int kReadBufSize = 32 * 1024;
18 } 20 }
19 21
20 namespace content { 22 namespace content {
21 23
22 DetachableResourceHandler::DetachableResourceHandler( 24 DetachableResourceHandler::DetachableResourceHandler(
23 net::URLRequest* request, 25 net::URLRequest* request,
24 base::TimeDelta cancel_delay, 26 base::TimeDelta cancel_delay,
25 scoped_ptr<ResourceHandler> next_handler) 27 scoped_ptr<ResourceHandler> next_handler)
26 : ResourceHandler(request), 28 : ResourceHandler(request),
27 next_handler_(next_handler.Pass()), 29 next_handler_(std::move(next_handler)),
28 cancel_delay_(cancel_delay), 30 cancel_delay_(cancel_delay),
29 is_deferred_(false), 31 is_deferred_(false),
30 is_finished_(false) { 32 is_finished_(false) {
31 GetRequestInfo()->set_detachable_handler(this); 33 GetRequestInfo()->set_detachable_handler(this);
32 } 34 }
33 35
34 DetachableResourceHandler::~DetachableResourceHandler() { 36 DetachableResourceHandler::~DetachableResourceHandler() {
35 // Cleanup back-pointer stored on the request info. 37 // Cleanup back-pointer stored on the request info.
36 GetRequestInfo()->set_detachable_handler(NULL); 38 GetRequestInfo()->set_detachable_handler(NULL);
37 } 39 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 203
202 void DetachableResourceHandler::CancelAndIgnore() { 204 void DetachableResourceHandler::CancelAndIgnore() {
203 controller()->CancelAndIgnore(); 205 controller()->CancelAndIgnore();
204 } 206 }
205 207
206 void DetachableResourceHandler::CancelWithError(int error_code) { 208 void DetachableResourceHandler::CancelWithError(int error_code) {
207 controller()->CancelWithError(error_code); 209 controller()->CancelWithError(error_code);
208 } 210 }
209 211
210 } // namespace content 212 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/cross_site_resource_handler.cc ('k') | content/browser/loader/layered_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698