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

Unified Diff: mojo/fetcher/local_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/data_fetcher_unittest.cc ('k') | mojo/fetcher/network_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/fetcher/local_fetcher.cc
diff --git a/mojo/fetcher/local_fetcher.cc b/mojo/fetcher/local_fetcher.cc
index 1bce4a545689213c30b13eee6c8302354ea411e6..e723eca6591700439c7157d4ed4e736e3abc6be5 100644
--- a/mojo/fetcher/local_fetcher.cc
+++ b/mojo/fetcher/local_fetcher.cc
@@ -4,6 +4,8 @@
#include "mojo/fetcher/local_fetcher.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
@@ -101,19 +103,19 @@ URLResponsePtr LocalFetcher::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);
}
response->mime_type = String::From(MimeType());
- 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 LocalFetcher::AsPath(
« no previous file with comments | « mojo/fetcher/data_fetcher_unittest.cc ('k') | mojo/fetcher/network_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698