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

Unified Diff: ipc/ipc_channel_posix.h

Issue 602193004: Refactoring: Let ChannelPosix adopt ScopedFD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.h
diff --git a/ipc/ipc_channel_posix.h b/ipc/ipc_channel_posix.h
index d806fb70ac4946a3311400c590f6a0f8c69b5425..9d0ed8bb764eb0a0756c7cafa637c2bcc52bf5f9 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
« no previous file with comments | « no previous file | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698