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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/web_process_memory_dump_impl.cc ('k') | content/child/web_url_loader_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 8ab7e9bf4a1f9244710ed0b207b65f38ba6e859f..9eedbf7c746b65a2b3bb8faaf7b16e97a3cf4492 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -5,9 +5,9 @@
#include "content/child/web_url_loader_impl.h"
#include <stdint.h>
-
#include <algorithm>
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/files/file_path.h"
@@ -341,11 +341,10 @@ WebURLLoaderImpl::Context::Context(
: loader_(loader),
client_(NULL),
resource_dispatcher_(resource_dispatcher),
- web_task_runner_(web_task_runner.Pass()),
+ web_task_runner_(std::move(web_task_runner)),
referrer_policy_(blink::WebReferrerPolicyDefault),
defers_loading_(NOT_DEFERRING),
- request_id_(-1) {
-}
+ request_id_(-1) {}
void WebURLLoaderImpl::Context::Cancel() {
if (resource_dispatcher_ && // NULL in unittest.
@@ -520,7 +519,7 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
void WebURLLoaderImpl::Context::SetWebTaskRunner(
scoped_ptr<blink::WebTaskRunner> web_task_runner) {
- web_task_runner_ = web_task_runner.Pass();
+ web_task_runner_ = std::move(web_task_runner);
}
void WebURLLoaderImpl::Context::OnUploadProgress(uint64_t position,
@@ -700,7 +699,7 @@ void WebURLLoaderImpl::Context::OnReceivedData(scoped_ptr<ReceivedData> data) {
// We don't support ftp_listening_delegate_ and multipart_delegate_ for
// now.
// TODO(yhirano): Support ftp listening and multipart.
- body_stream_writer_->AddData(data.Pass());
+ body_stream_writer_->AddData(std::move(data));
}
}
}
@@ -763,7 +762,7 @@ void WebURLLoaderImpl::Context::OnReceivedCompletedResponse(
OnReceivedResponse(info);
if (data)
- OnReceivedData(data.Pass());
+ OnReceivedData(std::move(data));
OnCompletedRequest(error_code, was_ignored_by_handler, stale_copy_in_cache,
security_info, completion_time, total_transfer_size);
}
@@ -869,8 +868,8 @@ void WebURLLoaderImpl::Context::HandleDataURL() {
WebURLLoaderImpl::WebURLLoaderImpl(
ResourceDispatcher* resource_dispatcher,
scoped_ptr<blink::WebTaskRunner> web_task_runner)
- : context_(new Context(this, resource_dispatcher, web_task_runner.Pass())) {
-}
+ : context_(
+ new Context(this, resource_dispatcher, std::move(web_task_runner))) {}
WebURLLoaderImpl::~WebURLLoaderImpl() {
cancel();
« no previous file with comments | « content/child/web_process_memory_dump_impl.cc ('k') | content/child/web_url_loader_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698