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

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

Issue 1485573002: Remove SimpleBroker and instead use the production broker implementation in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment Created 5 years, 1 month 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 | « ipc/mojo/run_all_unittests.cc ('k') | mojo/edk/system/BUILD.gn » ('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 5ab4ba641795a4376fe7e82c6a4c74137c0e450c..be43c741d1564a41c8ce2f04afb42846b71f0f45 100644
--- a/mojo/edk/embedder/embedder.cc
+++ b/mojo/edk/embedder/embedder.cc
@@ -7,6 +7,7 @@
#include "base/atomicops.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/command_line.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -23,7 +24,6 @@
#include "mojo/edk/system/core.h"
#include "mojo/edk/system/message_pipe_dispatcher.h"
#include "mojo/edk/system/platform_handle_dispatcher.h"
-#include "mojo/edk/system/simple_broker.h"
namespace mojo {
namespace edk {
@@ -117,9 +117,11 @@ void SetParentPipeHandle(ScopedPlatformHandle pipe) {
ChildBroker::GetInstance()->SetChildBrokerHostHandle(pipe.Pass());
}
-void Init() {
- if (!internal::g_broker)
- internal::g_broker = new SimpleBroker;
+void Init() {
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch("use-new-edk") && !internal::g_broker)
+ BrokerState::GetInstance();
DCHECK(!internal::g_platform_support);
internal::g_platform_support = new SimplePlatformSupport();
« no previous file with comments | « ipc/mojo/run_all_unittests.cc ('k') | mojo/edk/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698