diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 19:28:09 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 19:28:09 +0000 |
commit | 42ce94ec8e98df0744cc1dea26b49c084fe185f0 (patch) | |
tree | 8b585da323dc3bbabb3c61a8941aed90e1819648 /ipc/ipc_channel_handle.h | |
parent | ade3ef65f389b00a101da5eb18a02b966d354b18 (diff) | |
download | chromium_src-42ce94ec8e98df0744cc1dea26b49c084fe185f0.zip chromium_src-42ce94ec8e98df0744cc1dea26b49c084fe185f0.tar.gz chromium_src-42ce94ec8e98df0744cc1dea26b49c084fe185f0.tar.bz2 |
Convert over to channel handles
This hides some of the internals of the posix channels from users, and gets rid
of several #ifdef POSIX blocks. Generally simplifies usage of channels xplatform.
BUG=none
TEST=build
Review URL: http://codereview.chromium.org/5598010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_handle.h')
-rw-r--r-- | ipc/ipc_channel_handle.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ipc/ipc_channel_handle.h b/ipc/ipc_channel_handle.h index dc6957f..1b9a385 100644 --- a/ipc/ipc_channel_handle.h +++ b/ipc/ipc_channel_handle.h @@ -29,18 +29,19 @@ namespace IPC { struct ChannelHandle { // Note that serialization for this object is defined in the ParamTraits // template specialization in ipc_message_utils.h. - std::string name; -#if defined(OS_POSIX) - base::FileDescriptor socket; -#endif - ChannelHandle() {} + ChannelHandle(const std::string& n) : name(n) {} + ChannelHandle(const char* n) : name(n) {} #if defined(OS_POSIX) ChannelHandle(const std::string& n, const base::FileDescriptor& s) : name(n), socket(s) {} -#else - ChannelHandle(const std::string& n) : name(n) {} -#endif +#endif // defined(OS_POSIX) + + std::string name; +#if defined(OS_POSIX) + base::FileDescriptor socket; +#endif // defined(OS_POSIX) + }; } // namespace IPC |