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

Side by Side Diff: content/browser/loader/resource_loader.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, 11 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 (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 "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include <utility>
8
7 #include "base/command_line.h" 9 #include "base/command_line.h"
8 #include "base/location.h" 10 #include "base/location.h"
9 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
10 #include "base/profiler/scoped_tracker.h" 12 #include "base/profiler/scoped_tracker.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/time/time.h" 15 #include "base/time/time.h"
14 #include "content/browser/appcache/appcache_interceptor.h" 16 #include "content/browser/appcache/appcache_interceptor.h"
15 #include "content/browser/child_process_security_policy_impl.h" 17 #include "content/browser/child_process_security_policy_impl.h"
16 #include "content/browser/loader/cross_site_resource_handler.h" 18 #include "content/browser/loader/cross_site_resource_handler.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 DCHECK(!request->ssl_info().connection_status); 128 DCHECK(!request->ssl_info().connection_status);
127 } 129 }
128 } 130 }
129 131
130 } // namespace 132 } // namespace
131 133
132 ResourceLoader::ResourceLoader(scoped_ptr<net::URLRequest> request, 134 ResourceLoader::ResourceLoader(scoped_ptr<net::URLRequest> request,
133 scoped_ptr<ResourceHandler> handler, 135 scoped_ptr<ResourceHandler> handler,
134 ResourceLoaderDelegate* delegate) 136 ResourceLoaderDelegate* delegate)
135 : deferred_stage_(DEFERRED_NONE), 137 : deferred_stage_(DEFERRED_NONE),
136 request_(request.Pass()), 138 request_(std::move(request)),
137 handler_(handler.Pass()), 139 handler_(std::move(handler)),
138 delegate_(delegate), 140 delegate_(delegate),
139 is_transferring_(false), 141 is_transferring_(false),
140 times_cancelled_before_request_start_(0), 142 times_cancelled_before_request_start_(0),
141 started_request_(false), 143 started_request_(false),
142 times_cancelled_after_request_start_(0), 144 times_cancelled_after_request_start_(0),
143 weak_ptr_factory_(this) { 145 weak_ptr_factory_(this) {
144 request_->set_delegate(this); 146 request_->set_delegate(this);
145 handler_->SetController(this); 147 handler_->SetController(this);
146 } 148 }
147 149
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 case net::URLRequestStatus::FAILED: 710 case net::URLRequestStatus::FAILED:
709 status = STATUS_UNDEFINED; 711 status = STATUS_UNDEFINED;
710 break; 712 break;
711 } 713 }
712 714
713 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 715 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
714 } 716 }
715 } 717 }
716 718
717 } // namespace content 719 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698