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

Unified Diff: content/common/mojo/channel_init.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/common/input/web_input_event_traits.cc ('k') | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/channel_init.cc
diff --git a/content/common/mojo/channel_init.cc b/content/common/mojo/channel_init.cc
index 39aa1d055e329d2f1bc3c21a78484ac405303090..967fb10be605c4e8e32d7e03709e5946a02b5a87 100644
--- a/content/common/mojo/channel_init.cc
+++ b/content/common/mojo/channel_init.cc
@@ -4,6 +4,8 @@
#include "content/common/mojo/channel_init.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/lazy_instance.h"
@@ -26,15 +28,13 @@ mojo::ScopedMessagePipeHandle ChannelInit::Init(
scoped_refptr<base::TaskRunner> io_thread_task_runner) {
scoped_ptr<IPC::ScopedIPCSupport> ipc_support(
new IPC::ScopedIPCSupport(io_thread_task_runner));
- mojo::ScopedMessagePipeHandle message_pipe =
- mojo::embedder::CreateChannel(
- mojo::embedder::ScopedPlatformHandle(
- mojo::embedder::PlatformHandle(file)),
- base::Bind(&ChannelInit::OnCreatedChannel,
- weak_factory_.GetWeakPtr(),
- base::Passed(&ipc_support)),
- base::ThreadTaskRunnerHandle::Get()).Pass();
- return message_pipe.Pass();
+ mojo::ScopedMessagePipeHandle message_pipe = mojo::embedder::CreateChannel(
+ mojo::embedder::ScopedPlatformHandle(
+ mojo::embedder::PlatformHandle(file)),
+ base::Bind(&ChannelInit::OnCreatedChannel, weak_factory_.GetWeakPtr(),
+ base::Passed(&ipc_support)),
+ base::ThreadTaskRunnerHandle::Get());
+ return message_pipe;
}
void ChannelInit::WillDestroySoon() {
@@ -56,7 +56,7 @@ void ChannelInit::OnCreatedChannel(
DCHECK(!self->channel_info_);
self->channel_info_ = channel;
- self->ipc_support_ = ipc_support.Pass();
+ self->ipc_support_ = std::move(ipc_support);
}
} // namespace content
« no previous file with comments | « content/common/input/web_input_event_traits.cc ('k') | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698