| 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();
|
|
|