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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 704513003: Non-SFI mode: Clean up macros of base/ and ipc/ libraries for nacl_helper_nonsfi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « base/process/kill_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.cc
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 8e74c3a588e73d5255ed9aed6bfbc7321265e59c..79fc7f203a6cba777a7305dabf838109f8653f83 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -16,7 +16,7 @@
#include <sys/uio.h>
#endif
-#if !defined(__native_client_nonsfi__)
+#if !defined(OS_NACL_NONSFI)
#include <sys/un.h>
#endif
@@ -258,7 +258,7 @@ bool ChannelPosix::CreatePipe(
}
#endif // IPC_USES_READWRITE
} else if (mode_ & MODE_NAMED_FLAG) {
-#if defined(__native_client_nonsfi__)
+#if defined(OS_NACL_NONSFI)
LOG(FATAL)
<< "IPC channels in nacl_helper_nonsfi should not be in NAMED mode.";
#else
@@ -283,7 +283,7 @@ bool ChannelPosix::CreatePipe(
}
local_pipe.reset(local_pipe_fd);
-#endif // !defined(__native_client_nonsfi__)
+#endif // !defined(OS_NACL_NONSFI)
} else {
local_pipe.reset(PipeMap::GetInstance()->Lookup(pipe_name_));
if (mode_ & MODE_CLIENT_FLAG) {
@@ -345,7 +345,7 @@ bool ChannelPosix::CreatePipe(
#endif // IPC_USES_READWRITE
if ((mode_ & MODE_SERVER_FLAG) && (mode_ & MODE_NAMED_FLAG)) {
-#if defined(__native_client_nonsfi__)
+#if defined(OS_NACL_NONSFI)
LOG(FATAL) << "IPC channels in nacl_helper_nonsfi "
<< "should not be in NAMED or SERVER mode.";
#else
@@ -365,7 +365,7 @@ bool ChannelPosix::Connect() {
bool did_connect = true;
if (server_listen_pipe_.is_valid()) {
-#if defined(__native_client_nonsfi__)
+#if defined(OS_NACL_NONSFI)
LOG(FATAL) << "IPC channels in nacl_helper_nonsfi "
<< "should always be in client mode.";
#else
@@ -600,7 +600,7 @@ bool ChannelPosix::HasAcceptedConnection() const {
return AcceptsConnections() && pipe_.is_valid();
}
-#if !defined(__native_client_nonsfi__)
+#if !defined(OS_NACL_NONSFI)
// GetPeerEuid is not supported in nacl_helper_nonsfi.
bool ChannelPosix::GetPeerEuid(uid_t* peer_euid) const {
DCHECK(!(mode_ & MODE_SERVER) || HasAcceptedConnection());
@@ -655,7 +655,7 @@ void ChannelPosix::SetGlobalPid(int pid) {
// Called by libevent when we can read from the pipe without blocking.
void ChannelPosix::OnFileCanReadWithoutBlocking(int fd) {
if (fd == server_listen_pipe_.get()) {
-#if defined(__native_client_nonsfi__)
+#if defined(OS_NACL_NONSFI)
LOG(FATAL)
<< "IPC channels in nacl_helper_nonsfi should not be SERVER mode.";
#else
@@ -950,7 +950,7 @@ bool ChannelPosix::ExtractFileDescriptorsFromMsghdr(msghdr* msg) {
file_descriptors,
file_descriptors + num_file_descriptors);
-#if !defined(__native_client_nonsfi__)
+#if !defined(OS_NACL_NONSFI)
// The PNaCl toolchain for Non-SFI binary build does not support
// MSG_CTRUNC.
// Check this after adding the FDs so we don't leak them.
@@ -1063,7 +1063,7 @@ void ChannelPosix::Close() {
}
if (server_listen_pipe_.is_valid()) {
-#if defined(__native_client_nonsfi__)
+#if defined(OS_NACL_NONSFI)
LOG(FATAL)
<< "IPC channels in nacl_helper_nonsfi should not be SERVER mode.";
#else
« no previous file with comments | « base/process/kill_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698