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

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

Issue 2765673002: Revert of Making the Mojo Channel Messages legacy mode dynamic. (Closed)
Patch Set: 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/system/channel.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel.cc
diff --git a/mojo/edk/system/channel.cc b/mojo/edk/system/channel.cc
index 9fc8cfcc884b94b4590c88c31db7c9790ffe0f0d..8a44d36024e2346b3eab90a48f1eb77a35adcd63 100644
--- a/mojo/edk/system/channel.cc
+++ b/mojo/edk/system/channel.cc
@@ -14,7 +14,6 @@
#include "base/macros.h"
#include "base/memory/aligned_memory.h"
#include "base/process/process_handle.h"
-#include "mojo/edk/embedder/embedder_internal.h"
#include "mojo/edk/embedder/platform_handle.h"
#if defined(OS_MACOSX) && !defined(OS_IOS)
@@ -46,8 +45,6 @@
"message_type should be at the same offset in both Header "
"structs.");
-bool g_use_legacy_protocol = false;
-
} // namespace
const size_t kReadBufferSize = 4096;
@@ -56,10 +53,13 @@
const size_t kMaxAttachedHandles = 128;
Channel::Message::Message(size_t payload_size, size_t max_handles)
- : Message(payload_size,
- max_handles,
- g_use_legacy_protocol ? MessageType::NORMAL_LEGACY
- : MessageType::NORMAL) {}
+#if defined(MOJO_EDK_LEGACY_PROTOCOL)
+ : Message(payload_size, max_handles, MessageType::NORMAL_LEGACY) {
+}
+#else
+ : Message(payload_size, max_handles, MessageType::NORMAL) {
+}
+#endif
Channel::Message::Message(size_t payload_size,
size_t max_handles,
@@ -393,13 +393,6 @@
#else
return std::move(handle_vector_);
#endif
-}
-
-// static
-void Channel::Message::SetUseLegacyTransportProtocol(bool use_legacy_protocol) {
- // Make sure this is called before mojo::edk::Init() is called.
- DCHECK(!internal::g_core);
- g_use_legacy_protocol = use_legacy_protocol;
}
#if defined(OS_WIN)
« no previous file with comments | « mojo/edk/system/channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698