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

Unified Diff: mojo/edk/system/broker_state.cc

Issue 1555273002: [mojo] Add CreateSharedBuffer method to Broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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: mojo/edk/system/broker_state.cc
diff --git a/mojo/edk/system/broker_state.cc b/mojo/edk/system/broker_state.cc
index 90ea00dbc1a526568a8ee23d7ea5ff35ba750373..532843dc4c613a76292fc9d7f74a065844190825 100644
--- a/mojo/edk/system/broker_state.cc
+++ b/mojo/edk/system/broker_state.cc
@@ -11,6 +11,8 @@
#include "base/rand_util.h"
#include "mojo/edk/embedder/embedder_internal.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
+#include "mojo/edk/embedder/platform_shared_buffer.h"
+#include "mojo/edk/embedder/platform_support.h"
#include "mojo/edk/system/child_broker_host.h"
#include "mojo/edk/system/message_pipe_dispatcher.h"
#include "mojo/edk/system/routed_raw_channel.h"
@@ -65,6 +67,11 @@ void BrokerState::TokenToHandle(const uint64_t* tokens,
}
}
}
+#else
+scoped_refptr<PlatformSharedBuffer> BrokerState::CreateSharedBuffer(
+ size_t num_bytes) {
+ return internal::g_platform_support->CreateSharedBuffer(num_bytes);
+}
#endif
void BrokerState::ConnectMessagePipe(uint64_t pipe_id,

Powered by Google App Engine
This is Rietveld 408576698