summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_posix.h
diff options
context:
space:
mode:
authormorrita <morrita@chromium.org>2014-09-29 15:25:54 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-29 22:26:23 +0000
commitce44fef5fd60dd2be5c587d4b084bdcd36adcee4 (patch)
treeefe8c620920e34d26ed19ee2b078ed881b6df25c /ipc/ipc_channel_posix.h
parent98a07838b754c13f7269319e2bb35ab5edfcbc61 (diff)
downloadchromium_src-ce44fef5fd60dd2be5c587d4b084bdcd36adcee4.zip
chromium_src-ce44fef5fd60dd2be5c587d4b084bdcd36adcee4.tar.gz
chromium_src-ce44fef5fd60dd2be5c587d4b084bdcd36adcee4.tar.bz2
Refactoring: Let ChannelPosix adopt ScopedFD.
This gets rid of raw close() call usign base::ScopedFD. Ownership of FDs become clearer. This is a preparation for kiling base::FileDescriptor. R=jam@chromium.org, agl@chromium.org BUG=415294 Review URL: https://codereview.chromium.org/602193004 Cr-Commit-Position: refs/heads/master@{#297285}
Diffstat (limited to 'ipc/ipc_channel_posix.h')
-rw-r--r--ipc/ipc_channel_posix.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/ipc/ipc_channel_posix.h b/ipc/ipc_channel_posix.h
index d806fb7..9d0ed8b 100644
--- a/ipc/ipc_channel_posix.h
+++ b/ipc/ipc_channel_posix.h
@@ -14,6 +14,7 @@
#include <string>
#include <vector>
+#include "base/files/scoped_file.h"
#include "base/message_loop/message_loop.h"
#include "base/process/process.h"
#include "ipc/file_descriptor_set_posix.h"
@@ -152,20 +153,20 @@ class IPC_EXPORT ChannelPosix : public Channel,
// File descriptor we're listening on for new connections if we listen
// for connections.
- int server_listen_pipe_;
+ base::ScopedFD server_listen_pipe_;
// The pipe used for communication.
- int pipe_;
+ base::ScopedFD pipe_;
// For a server, the client end of our socketpair() -- the other end of our
// pipe_ that is passed to the client.
- int client_pipe_;
+ base::ScopedFD client_pipe_;
mutable base::Lock client_pipe_lock_; // Lock that protects |client_pipe_|.
#if defined(IPC_USES_READWRITE)
// Linux/BSD use a dedicated socketpair() for passing file descriptors.
- int fd_pipe_;
- int remote_fd_pipe_;
+ base::ScopedFD fd_pipe_;
+ base::ScopedFD remote_fd_pipe_;
#endif
// The "name" of our pipe. On Windows this is the global identifier for