diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-05 02:38:34 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-05 02:38:34 +0000 |
commit | 0a6fc4bea99fb5d77721bc5bd2ffa467f8d4c5d5 (patch) | |
tree | d3c63a4a3730879856cb91c1d7234398ef18b27e /ipc/ipc_channel.h | |
parent | 20c4975cc82624ccf560668b21e7e33b29c71907 (diff) | |
download | chromium_src-0a6fc4bea99fb5d77721bc5bd2ffa467f8d4c5d5.zip chromium_src-0a6fc4bea99fb5d77721bc5bd2ffa467f8d4c5d5.tar.gz chromium_src-0a6fc4bea99fb5d77721bc5bd2ffa467f8d4c5d5.tar.bz2 |
Make IPC channels track their peer process ID
BrokerDuplicateHandle() requires the target process ID on Windows. Rather than plumb this into every channel class independently, I'm adding it at the top.
TEST=IPCSyncChannelTest.Verified
Review URL: http://codereview.chromium.org/9968111
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel.h')
-rw-r--r-- | ipc/ipc_channel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h index 4f1e75f..5557306 100644 --- a/ipc/ipc_channel.h +++ b/ipc/ipc_channel.h @@ -9,6 +9,7 @@ #include <string> #include "base/compiler_specific.h" +#include "base/process.h" #include "ipc/ipc_channel_handle.h" #include "ipc/ipc_message.h" @@ -149,6 +150,10 @@ class IPC_EXPORT Channel : public Message::Sender { // Modify the Channel's listener. void set_listener(Listener* listener); + // Get the process ID for the connected peer. + // Returns base::kNullProcessId if the peer is not connected yet. + base::ProcessId peer_pid() const; + // Send a message over the Channel to the listener on the other end. // // |message| must be allocated using operator new. This object will be |