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

Unified Diff: ipc/ipc_sync_channel.h

Issue 310853003: Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 years, 6 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 | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel.h
diff --git a/ipc/ipc_sync_channel.h b/ipc/ipc_sync_channel.h
index f18fcff95ddd360344080709c4e97d5c5c38db8d..8984184da293ae81508293db635a12c4b6bac164 100644
--- a/ipc/ipc_sync_channel.h
+++ b/ipc/ipc_sync_channel.h
@@ -66,19 +66,22 @@ class IPC_EXPORT SyncChannel : public ChannelProxy {
// Creates and initializes a sync channel. If create_pipe_now is specified,
// the channel will be initialized synchronously.
- SyncChannel(const IPC::ChannelHandle& channel_handle,
- Channel::Mode mode,
- Listener* listener,
- base::SingleThreadTaskRunner* ipc_task_runner,
- bool create_pipe_now,
- base::WaitableEvent* shutdown_event);
+ // The naming pattern follows IPC::Channel.
+ static scoped_ptr<SyncChannel> Create(
+ const IPC::ChannelHandle& channel_handle,
+ IPC::Channel::Mode mode,
+ Listener* listener,
+ base::SingleThreadTaskRunner* ipc_task_runner,
+ bool create_pipe_now,
+ base::WaitableEvent* shutdown_event);
// Creates an uninitialized sync channel. Call ChannelProxy::Init to
// initialize the channel. This two-step setup allows message filters to be
// added before any messages are sent or received.
- SyncChannel(Listener* listener,
- base::SingleThreadTaskRunner* ipc_task_runner,
- base::WaitableEvent* shutdown_event);
+ static scoped_ptr<SyncChannel> Create(
+ Listener* listener,
+ base::SingleThreadTaskRunner* ipc_task_runner,
+ base::WaitableEvent* shutdown_event);
virtual ~SyncChannel();
@@ -188,6 +191,10 @@ class IPC_EXPORT SyncChannel : public ChannelProxy {
};
private:
+ SyncChannel(Listener* listener,
+ base::SingleThreadTaskRunner* ipc_task_runner,
+ base::WaitableEvent* shutdown_event);
+
void OnWaitableEventSignaled(base::WaitableEvent* arg);
SyncContext* sync_context() {
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698