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

Side by Side Diff: ipc/ipc_channel_posix.h

Issue 177049: On Linux, move the passing of filedescriptors to a dedicated socketpair(). (Closed)
Patch Set: Removed *.d files from reference build Created 11 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IPC_IPC_CHANNEL_POSIX_H_ 5 #ifndef IPC_IPC_CHANNEL_POSIX_H_
6 #define IPC_IPC_CHANNEL_POSIX_H_ 6 #define IPC_IPC_CHANNEL_POSIX_H_
7 7
8 #include "ipc/ipc_channel.h" 8 #include "ipc/ipc_channel.h"
9 9
10 #include <sys/socket.h> // for CMSG macros 10 #include <sys/socket.h> // for CMSG macros
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // unused otherwise. 76 // unused otherwise.
77 int server_listen_pipe_; 77 int server_listen_pipe_;
78 78
79 // The pipe used for communication. 79 // The pipe used for communication.
80 int pipe_; 80 int pipe_;
81 81
82 // For a server, the client end of our socketpair() -- the other end of our 82 // For a server, the client end of our socketpair() -- the other end of our
83 // pipe_ that is passed to the client. 83 // pipe_ that is passed to the client.
84 int client_pipe_; 84 int client_pipe_;
85 85
86 #if defined(OS_LINUX)
87 // Linux uses a dedicated socketpair() for passing file descriptors.
88 int fd_pipe_;
89 int remote_fd_pipe_;
90 #endif
91
86 // The "name" of our pipe. On Windows this is the global identifier for 92 // The "name" of our pipe. On Windows this is the global identifier for
87 // the pipe. On POSIX it's used as a key in a local map of file descriptors. 93 // the pipe. On POSIX it's used as a key in a local map of file descriptors.
88 std::string pipe_name_; 94 std::string pipe_name_;
89 95
90 Listener* listener_; 96 Listener* listener_;
91 97
92 // Messages to be sent are queued here. 98 // Messages to be sent are queued here.
93 std::queue<Message*> output_queue_; 99 std::queue<Message*> output_queue_;
94 100
95 // We read from the pipe into this buffer 101 // We read from the pipe into this buffer
(...skipping 30 matching lines...) Expand all
126 bool processing_incoming_; 132 bool processing_incoming_;
127 133
128 ScopedRunnableMethodFactory<ChannelImpl> factory_; 134 ScopedRunnableMethodFactory<ChannelImpl> factory_;
129 135
130 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); 136 DISALLOW_COPY_AND_ASSIGN(ChannelImpl);
131 }; 137 };
132 138
133 } // namespace IPC 139 } // namespace IPC
134 140
135 #endif // IPC_IPC_CHANNEL_POSIX_H_ 141 #endif // IPC_IPC_CHANNEL_POSIX_H_
OLDNEW
« no previous file with comments | « chrome/tools/test/reference_build/chrome_linux/themes/default.pak ('k') | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698