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

Unified Diff: mojo/fetcher/update_fetcher.cc

Issue 1538823002: Convert Pass()→std::move() in mojo/ (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 | « mojo/fetcher/network_fetcher_unittest.cc ('k') | mojo/gles2/command_buffer_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/fetcher/update_fetcher.cc
diff --git a/mojo/fetcher/update_fetcher.cc b/mojo/fetcher/update_fetcher.cc
index d48252fce49d18175816a74ea93330e80b9b0b36..9cf570ea3314aaaa71baa499de771bd7ec6ad8a2 100644
--- a/mojo/fetcher/update_fetcher.cc
+++ b/mojo/fetcher/update_fetcher.cc
@@ -4,6 +4,8 @@
#include "mojo/fetcher/update_fetcher.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/format_macros.h"
@@ -50,18 +52,18 @@ URLResponsePtr UpdateFetcher::AsURLResponse(base::TaskRunner* task_runner,
URLResponsePtr response(URLResponse::New());
response->url = String::From(url_);
DataPipe data_pipe;
- response->body = data_pipe.consumer_handle.Pass();
+ response->body = std::move(data_pipe.consumer_handle);
int64 file_size;
if (base::GetFileSize(path_, &file_size)) {
response->headers = Array<HttpHeaderPtr>(1);
HttpHeaderPtr header = HttpHeader::New();
header->name = "Content-Length";
header->value = base::StringPrintf("%" PRId64, file_size);
- response->headers[0] = header.Pass();
+ response->headers[0] = std::move(header);
}
- common::CopyFromFile(path_, data_pipe.producer_handle.Pass(), skip,
+ common::CopyFromFile(path_, std::move(data_pipe.producer_handle), skip,
task_runner, base::Bind(&IgnoreResult));
- return response.Pass();
+ return response;
}
void UpdateFetcher::AsPath(
« no previous file with comments | « mojo/fetcher/network_fetcher_unittest.cc ('k') | mojo/gles2/command_buffer_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698