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

Unified Diff: ipc/mojo/ipc_channel_mojo.h

Issue 1054253005: ChannelMojo: Ensure that it always has ScopedIPCSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the ipc_fuzzer breakage Created 5 years, 8 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 | « content/test/render_thread_impl_browser_test_ipc_helper.cc ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/mojo/ipc_channel_mojo.h
diff --git a/ipc/mojo/ipc_channel_mojo.h b/ipc/mojo/ipc_channel_mojo.h
index 1959e0f800574e3170fb913885b23fc925011293..40bc2560526329caf26cc9f4974e4128f7eaa71c 100644
--- a/ipc/mojo/ipc_channel_mojo.h
+++ b/ipc/mojo/ipc_channel_mojo.h
@@ -54,7 +54,6 @@ class IPC_MOJO_EXPORT ChannelMojo
public:
virtual ~Delegate() {}
virtual base::WeakPtr<Delegate> ToWeakPtr() = 0;
- virtual scoped_refptr<base::TaskRunner> GetIOTaskRunner() = 0;
virtual void OnChannelCreated(base::WeakPtr<ChannelMojo> channel) = 0;
};
@@ -63,20 +62,24 @@ class IPC_MOJO_EXPORT ChannelMojo
// Create ChannelMojo. A bootstrap channel is created as well.
// |host| must not be null for server channels.
- static scoped_ptr<ChannelMojo> Create(Delegate* delegate,
- const ChannelHandle& channel_handle,
- Mode mode,
- Listener* listener);
+ static scoped_ptr<ChannelMojo> Create(
+ Delegate* delegate,
+ scoped_refptr<base::TaskRunner> io_runner,
+ const ChannelHandle& channel_handle,
+ Mode mode,
+ Listener* listener);
// Create a factory object for ChannelMojo.
// The factory is used to create Mojo-based ChannelProxy family.
// |host| must not be null.
static scoped_ptr<ChannelFactory> CreateServerFactory(
Delegate* delegate,
+ scoped_refptr<base::TaskRunner> io_runner,
const ChannelHandle& channel_handle);
static scoped_ptr<ChannelFactory> CreateClientFactory(
Delegate* delegate,
+ scoped_refptr<base::TaskRunner> io_runner,
const ChannelHandle& channel_handle);
~ChannelMojo() override;
@@ -115,6 +118,7 @@ class IPC_MOJO_EXPORT ChannelMojo
protected:
ChannelMojo(Delegate* delegate,
+ scoped_refptr<base::TaskRunner> io_runner,
const ChannelHandle& channel_handle,
Mode mode,
Listener* listener);
@@ -136,7 +140,7 @@ class IPC_MOJO_EXPORT ChannelMojo
// notifications invoked by them.
typedef internal::MessagePipeReader::DelayedDeleter ReaderDeleter;
- void InitDelegate(ChannelMojo::Delegate* delegate);
+ void InitOnIOThread(ChannelMojo::Delegate* delegate);
scoped_ptr<MojoBootstrap> bootstrap_;
base::WeakPtr<Delegate> delegate_;
« no previous file with comments | « content/test/render_thread_impl_browser_test_ipc_helper.cc ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698