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

Unified Diff: mojo/edk/system/channel.h

Issue 2008953003: [mojo-edk] Explicitly serialise HANDLEs into messages instead of PlatformHandles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 7 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 | mojo/edk/system/channel.cc » ('j') | mojo/edk/system/channel.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel.h
diff --git a/mojo/edk/system/channel.h b/mojo/edk/system/channel.h
index ab93431a4439dff624a842242010a593e792d812..9cc7e7a892ba93517a4e72104cf59eb4a9df05ae 100644
--- a/mojo/edk/system/channel.h
+++ b/mojo/edk/system/channel.h
@@ -128,7 +128,6 @@ class Channel : public base::RefCountedThreadSafe<Channel> {
size_t num_handles() const { return header_->num_handles; }
bool has_handles() const { return header_->num_handles > 0; }
- PlatformHandle* handles();
#if defined(OS_MACOSX) && !defined(OS_IOS)
bool has_mach_ports() const;
#endif
@@ -151,8 +150,7 @@ class Channel : public base::RefCountedThreadSafe<Channel> {
// duplication.
static bool RewriteHandles(base::ProcessHandle from_process,
base::ProcessHandle to_process,
- PlatformHandle* handles,
- size_t num_handles);
+ PlatformHandleVector* handles);
#endif
private:
@@ -161,14 +159,12 @@ class Channel : public base::RefCountedThreadSafe<Channel> {
char* data_;
Header* header_;
-#if defined(OS_WIN)
- // On Windows, handles are serialised into the extra header section.
- PlatformHandle* handles_ = nullptr;
-#else
ScopedPlatformHandleVectorPtr handle_vector_;
-#endif
-#if defined(OS_MACOSX) && !defined(OS_IOS)
+#if defined(OS_WIN)
+ // On Windows, handles are serialised into the extra header section.
+ HANDLE* handles_ = nullptr;
+#elif defined(OS_MACOSX) && !defined(OS_IOS)
// On OSX, handles are serialised into the extra header section.
MachPortsExtraHeader* mach_ports_header_ = nullptr;
#endif
« no previous file with comments | « no previous file | mojo/edk/system/channel.cc » ('j') | mojo/edk/system/channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698