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

Unified Diff: mojo/common/data_pipe_utils.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/common/data_pipe_drainer.cc ('k') | mojo/common/weak_binding_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/data_pipe_utils.cc
diff --git a/mojo/common/data_pipe_utils.cc b/mojo/common/data_pipe_utils.cc
index 100453df4e826c1423eb8b6affabe4b464437807..7eb52e4cd9db39cf7dd680981c7f7acb1962f2fd 100644
--- a/mojo/common/data_pipe_utils.cc
+++ b/mojo/common/data_pipe_utils.cc
@@ -5,6 +5,7 @@
#include "mojo/common/data_pipe_utils.h"
#include <stdio.h>
+#include <utility>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -67,8 +68,8 @@ bool BlockingCopyToString(ScopedDataPipeConsumerHandle source,
std::string* result) {
CHECK(result);
result->clear();
- return BlockingCopyHelper(
- source.Pass(), base::Bind(&CopyToStringHelper, result));
+ return BlockingCopyHelper(std::move(source),
+ base::Bind(&CopyToStringHelper, result));
}
bool MOJO_COMMON_EXPORT BlockingCopyFromString(
@@ -109,8 +110,8 @@ bool BlockingCopyToFile(ScopedDataPipeConsumerHandle source,
base::ScopedFILE fp(base::OpenFile(destination, "wb"));
if (!fp)
return false;
- return BlockingCopyHelper(
- source.Pass(), base::Bind(&CopyToFileHelper, fp.get()));
+ return BlockingCopyHelper(std::move(source),
+ base::Bind(&CopyToFileHelper, fp.get()));
}
void CopyToFile(ScopedDataPipeConsumerHandle source,
« no previous file with comments | « mojo/common/data_pipe_drainer.cc ('k') | mojo/common/weak_binding_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698