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

Unified Diff: ipc/ipc_channel.h

Issue 659243002: Non-SFI Mode: Build ipc/ library by PNaCl toolchain for nacl_helper_nonsfi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 | « components/nacl_nonsfi.gyp ('k') | ipc/ipc_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel.h
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index f6bd5044c14af5150e12a9a964a382d7d630c4cc..71e5b79ba42a9cd8b707ffa9242351c5ce040c89 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -179,7 +179,8 @@ 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)
+#if defined(OS_POSIX) && \
+ (!defined(OS_NACL) || defined(__native_client_nonsfi__))
dmichael (off chromium) 2014/10/20 19:17:21 This is unfortunately complicated. I guess the sh
hidehiko 2014/10/20 20:22:00 Yes, OS_NACL is defined for both. Actually both ar
// 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.
@@ -190,13 +191,13 @@ class IPC_EXPORT Channel : public Sender {
// file descriptor to the caller.
// This method can be called on any thread.
virtual int 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__)
// Generates a channel ID that's non-predictable and unique.
static std::string GenerateUniqueRandomChannelID();
@@ -207,7 +208,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.
« no previous file with comments | « components/nacl_nonsfi.gyp ('k') | ipc/ipc_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698