Chromium Code Reviews| Index: ipc/ipc_channel.h |
| diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h |
| index a7982e5554f1f719270831680748c8d5ef2f0d87..5abc713ad1a8074bfeffd8e7a6f848782e1a6cdc 100644 |
| --- a/ipc/ipc_channel.h |
| +++ b/ipc/ipc_channel.h |
| @@ -180,7 +180,11 @@ class IPC_EXPORT Channel : public Sender { |
| // deleted once the contents of the Message have been sent. |
| virtual bool Send(Message* message) = 0; |
| -#if defined(OS_POSIX) && !defined(OS_NACL) |
| + // NaCl in Non-SFI mode runs on Linux directly, and the following functions |
| + // compiled on Linux are also needed. Please see also comments in |
| + // components/nacl_nonsfi.gyp for more details. |
| +#if defined(OS_POSIX) && \ |
| + (!defined(OS_NACL) || defined(__native_client_nonsfi__)) |
| // On POSIX an IPC::Channel wraps a socketpair(), this method returns the |
| // FD # for the client end of the socket. |
| // This method may only be called on the server side of a channel. |
| @@ -191,13 +195,13 @@ class IPC_EXPORT Channel : public Sender { |
| // file descriptor to the caller. |
| // This method can be called on any thread. |
| virtual base::ScopedFD TakeClientFileDescriptor() = 0; |
| -#endif // defined(OS_POSIX) && !defined(OS_NACL) |
| +#endif |
| // Returns true if a named server channel is initialized on the given channel |
| // ID. Even if true, the server may have already accepted a connection. |
| static bool IsNamedServerInitialized(const std::string& channel_id); |
| -#if !defined(OS_NACL) |
| +#if !defined(OS_NACL) || defined(__native_client_nonsfi__) |
|
Junichi Uekawa
2014/10/23 05:34:24
optional: I wish we had OS_NACL_NONSFI, OS_NACL_SF
hidehiko
2014/10/23 14:19:10
Ok, but please let me work on it separately, becau
|
| // Generates a channel ID that's non-predictable and unique. |
| static std::string GenerateUniqueRandomChannelID(); |
| @@ -208,7 +212,7 @@ class IPC_EXPORT Channel : public Sender { |
| static std::string GenerateVerifiedChannelID(const std::string& prefix); |
| #endif |
| -#if defined(OS_LINUX) |
| +#if defined(OS_LINUX) || defined(__native_client_nonsfi__) |
| // Sandboxed processes live in a PID namespace, so when sending the IPC hello |
| // message from client to server we need to send the PID from the global |
| // PID namespace. |