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

Unified Diff: mojo/edk/embedder/embedder.cc

Issue 2749853003: Making the Mojo Channel Messages legacy mode dynamic. (Closed)
Patch Set: Fixed NaCl browser test failures. Created 3 years, 9 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/embedder/embedder.h ('k') | mojo/edk/system/channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/embedder.cc
diff --git a/mojo/edk/embedder/embedder.cc b/mojo/edk/embedder/embedder.cc
index 0fdda5cd1c72bbf512f56ba07ab5f681b5f43241..ec069fa72f83088393168485a72d05a0c01d02ee 100644
--- a/mojo/edk/embedder/embedder.cc
+++ b/mojo/edk/embedder/embedder.cc
@@ -18,6 +18,7 @@
#include "mojo/edk/embedder/embedder_internal.h"
#include "mojo/edk/embedder/entrypoints.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
+#include "mojo/edk/system/channel.h"
#include "mojo/edk/system/core.h"
#include "mojo/edk/system/node_controller.h"
@@ -74,7 +75,9 @@ void Init() {
MojoSystemThunks thunks = MakeSystemThunks();
size_t expected_size = MojoEmbedderSetSystemThunks(&thunks);
DCHECK_EQ(expected_size, sizeof(thunks));
-
+#if defined(MOJO_EDK_LEGACY_PROTOCOL)
+ SetUseLegacyTransportProtocol(true);
+#endif
internal::g_core = new Core();
}
@@ -82,6 +85,10 @@ void SetDefaultProcessErrorCallback(const ProcessErrorCallback& callback) {
internal::g_core->SetDefaultProcessErrorCallback(callback);
}
+void SetUseLegacyTransportProtocol(bool use_legacy_protocol) {
+ Channel::Message::SetUseLegacyTransportProtocol(use_legacy_protocol);
+}
+
MojoResult CreatePlatformHandleWrapper(
ScopedPlatformHandle platform_handle,
MojoHandle* platform_handle_wrapper_handle) {
« no previous file with comments | « mojo/edk/embedder/embedder.h ('k') | mojo/edk/system/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698