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

Unified Diff: mojo/edk/system/channel_manager.cc

Issue 1412283002: Convert mojo::system::Dispatcher to use our new refcounting stuff (instead of base's). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: no change Created 5 years, 2 months 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/edk/system/channel_manager.h ('k') | mojo/edk/system/channel_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel_manager.cc
diff --git a/mojo/edk/system/channel_manager.cc b/mojo/edk/system/channel_manager.cc
index 01c5fd75ac3002c4cc695185578c8c390b1425fc..a8404ec29930ae5f98a805b95cc437fc84f7b40c 100644
--- a/mojo/edk/system/channel_manager.cc
+++ b/mojo/edk/system/channel_manager.cc
@@ -79,13 +79,12 @@ void ChannelManager::Shutdown(
DCHECK(ok);
}
-scoped_refptr<MessagePipeDispatcher> ChannelManager::CreateChannelOnIOThread(
+RefPtr<MessagePipeDispatcher> ChannelManager::CreateChannelOnIOThread(
ChannelId channel_id,
embedder::ScopedPlatformHandle platform_handle) {
RefPtr<ChannelEndpoint> bootstrap_channel_endpoint;
- scoped_refptr<MessagePipeDispatcher> dispatcher =
- MessagePipeDispatcher::CreateRemoteMessagePipe(
- &bootstrap_channel_endpoint);
+ auto dispatcher = MessagePipeDispatcher::CreateRemoteMessagePipe(
+ &bootstrap_channel_endpoint);
CreateChannelOnIOThreadHelper(channel_id, platform_handle.Pass(),
std::move(bootstrap_channel_endpoint));
return dispatcher;
@@ -98,7 +97,7 @@ RefPtr<Channel> ChannelManager::CreateChannelWithoutBootstrapOnIOThread(
nullptr);
}
-scoped_refptr<MessagePipeDispatcher> ChannelManager::CreateChannel(
+RefPtr<MessagePipeDispatcher> ChannelManager::CreateChannel(
ChannelId channel_id,
embedder::ScopedPlatformHandle platform_handle,
const base::Closure& callback,
@@ -107,9 +106,8 @@ scoped_refptr<MessagePipeDispatcher> ChannelManager::CreateChannel(
// (|callback_thread_task_runner| may be null.)
RefPtr<ChannelEndpoint> bootstrap_channel_endpoint;
- scoped_refptr<MessagePipeDispatcher> dispatcher =
- MessagePipeDispatcher::CreateRemoteMessagePipe(
- &bootstrap_channel_endpoint);
+ auto dispatcher = MessagePipeDispatcher::CreateRemoteMessagePipe(
+ &bootstrap_channel_endpoint);
bool ok = io_thread_task_runner_->PostTask(
FROM_HERE,
base::Bind(&ChannelManager::CreateChannelHelper, base::Unretained(this),
« no previous file with comments | « mojo/edk/system/channel_manager.h ('k') | mojo/edk/system/channel_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698