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

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

Issue 1956843002: EDK: Make TransportData preserve handle rights. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 | « mojo/edk/system/message_pipe_test_utils.h ('k') | mojo/edk/system/transport_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/transport_data.h
diff --git a/mojo/edk/system/transport_data.h b/mojo/edk/system/transport_data.h
index 8698a6d388fe79eff65626062c32dcddba9c3a34..310e33d85cdaaf0f736fe058b1fe83125d8f4f7f 100644
--- a/mojo/edk/system/transport_data.h
+++ b/mojo/edk/system/transport_data.h
@@ -13,6 +13,8 @@
#include "mojo/edk/platform/aligned_alloc.h"
#include "mojo/edk/platform/scoped_platform_handle.h"
#include "mojo/edk/system/dispatcher.h"
+#include "mojo/edk/system/handle.h"
+#include "mojo/public/c/system/handle.h"
#include "mojo/public/cpp/system/macros.h"
namespace mojo {
@@ -87,9 +89,6 @@ class TransportData {
static size_t GetMaxPlatformHandles();
TransportData(std::unique_ptr<HandleVector> handles, Channel* channel);
- // TODO(vtl): Remove this, once |TransportData| really supports handles.
- TransportData(std::unique_ptr<DispatcherVector> dispatchers,
- Channel* channel);
// This is used for users of |MessageInTransit|/|TransportData|/|RawChannel|
// that want to simply transport data and platform handles, and not
@@ -138,10 +137,10 @@ class TransportData {
size_t* num_platform_handles,
const void** platform_handle_table);
- // Deserializes dispatchers from the given (serialized) transport data buffer
+ // Deserializes handles from the given (serialized) transport data buffer
// (typically from a |MessageInTransit::View|) and vector of platform handles.
// |buffer| should be non-null and |buffer_size| should be nonzero.
- static std::unique_ptr<DispatcherVector> DeserializeDispatchers(
+ static std::unique_ptr<HandleVector> DeserializeHandles(
const void* buffer,
size_t buffer_size,
std::unique_ptr<std::vector<platform::ScopedPlatformHandle>>
@@ -168,7 +167,7 @@ class TransportData {
int32_t type; // From |Dispatcher::Type| (|UNKNOWN| for "invalid").
uint32_t offset; // Relative to the start of the "secondary buffer".
uint32_t size; // (Not including any padding.)
- uint32_t unused;
+ MojoHandleRights rights;
};
const Header* header() const {
« no previous file with comments | « mojo/edk/system/message_pipe_test_utils.h ('k') | mojo/edk/system/transport_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698