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

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
Index: ipc/ipc_message.h
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h
index 198e6c0a9e59eeb4274cdae838577b909e3ab797..a0dce4fa5e351667dc231ff039326358ab5a98d8 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::File 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::File* file) const;
// Returns true if there are any file descriptors in this message.
bool HasFileDescriptors() const;

Powered by Google App Engine
This is Rietveld 408576698