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

Unified Diff: ipc/ipc_message.h

Issue 583473002: IPC: Get rid of FileDescriptor usage from FileDescriptorSet and Message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message.h
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h
index 198e6c0a9e59eeb4274cdae838577b909e3ab797..a48fcb1681e5f8e796d6e970bae7677d57aa5504 100644
--- a/ipc/ipc_message.h
+++ b/ipc/ipc_message.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/debug/trace_event.h"
+#include "base/files/file.h"
#include "base/pickle.h"
#include "ipc/ipc_export.h"
@@ -20,10 +21,6 @@
#include "base/memory/ref_counted.h"
#endif
-namespace base {
-struct FileDescriptor;
-}
-
class FileDescriptorSet;
namespace IPC {
@@ -178,12 +175,12 @@ class IPC_EXPORT Message : public Pickle {
// This is used to pass a file descriptor to the peer of an IPC channel.
// Add a descriptor to the end of the set. Returns false if the set is full.
- bool WriteFileDescriptor(const base::FileDescriptor& descriptor);
+ bool WriteFile(base::ScopedFD descriptor);
+ bool WriteBorrowingFile(const base::PlatformFile& descriptor);
// Get a file descriptor from the message. Returns false on error.
// iter: a Pickle iterator to the current location in the message.
- bool ReadFileDescriptor(PickleIterator* iter,
- base::FileDescriptor* descriptor) const;
+ bool ReadFile(PickleIterator* iter, base::ScopedFD* file) const;
// Returns true if there are any file descriptors in this message.
bool HasFileDescriptors() const;
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698