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

Unified Diff: ipc/ipc_channel.h

Issue 5598010: Convert over to channel handles (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed up bad whitespace Created 10 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
Index: ipc/ipc_channel.h
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 1b5d73a04cb217d7f5f3dd2998417ebabcf24341..d07e3e598dcb5612922a700c81325ed49401643d 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/compiler_specific.h"
+#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message.h"
namespace IPC {
@@ -54,7 +55,10 @@ class Channel : public Message::Sender {
// Initialize a Channel.
//
- // |channel_id| identifies the communication Channel.
+ // |channel_handle| identifies the communication Channel. For POSIX, if
+ // the file descriptor in the channel handle is != -1, the channel takes
+ // ownership of the file descriptor and will close it appropriately, otherwise
+ // it will create a new descriptor internally.
// |mode| specifies whether this Channel is to operate in server mode or
// client mode. In server mode, the Channel is responsible for setting up the
// IPC object, whereas in client mode, the Channel merely connects to the
@@ -62,7 +66,8 @@ class Channel : public Message::Sender {
// |listener| receives a callback on the current thread for each newly
// received message.
//
- Channel(const std::string& channel_id, Mode mode, Listener* listener);
+ Channel(const IPC::ChannelHandle &channel_handle, Mode mode,
brettw 2010/12/08 22:49:27 The & should be next to the type name.
+ Listener* listener);
~Channel();

Powered by Google App Engine
This is Rietveld 408576698