| Index: mojo/embedder/embedder.cc
|
| diff --git a/mojo/embedder/embedder.cc b/mojo/embedder/embedder.cc
|
| index ed6aecfec1df3cadbfd2a7df21d1d8c4db29d616..409fbec66d02ad94e44762d070bd046c49e9e035 100644
|
| --- a/mojo/embedder/embedder.cc
|
| +++ b/mojo/embedder/embedder.cc
|
| @@ -9,7 +9,7 @@
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "mojo/system/channel.h"
|
| -#include "mojo/system/core_impl.h"
|
| +#include "mojo/system/core.h"
|
| #include "mojo/system/message_pipe.h"
|
| #include "mojo/system/message_pipe_dispatcher.h"
|
| #include "mojo/system/raw_channel.h"
|
| @@ -21,6 +21,10 @@ struct ChannelInfo {
|
| scoped_refptr<system::Channel> channel;
|
| };
|
|
|
| +void Init() {
|
| + system::Core::GetInstance();
|
| +}
|
| +
|
| static void CreateChannelOnIOThread(
|
| ScopedPlatformHandle platform_handle,
|
| scoped_refptr<system::MessagePipe> message_pipe,
|
| @@ -54,10 +58,6 @@ static void CreateChannelOnIOThread(
|
| }
|
| }
|
|
|
| -void Init() {
|
| - Core::Init(new system::CoreImpl());
|
| -}
|
| -
|
| ScopedMessagePipeHandle CreateChannel(
|
| ScopedPlatformHandle platform_handle,
|
| scoped_refptr<base::TaskRunner> io_thread_task_runner,
|
| @@ -69,10 +69,10 @@ ScopedMessagePipeHandle CreateChannel(
|
| scoped_refptr<system::MessagePipe> > remote_message_pipe =
|
| system::MessagePipeDispatcher::CreateRemoteMessagePipe();
|
|
|
| - system::CoreImpl* core_impl = static_cast<system::CoreImpl*>(Core::Get());
|
| - DCHECK(core_impl);
|
| + system::Core* core = system::Core::GetInstance();
|
| + DCHECK(core);
|
| ScopedMessagePipeHandle rv(
|
| - MessagePipeHandle(core_impl->AddDispatcher(remote_message_pipe.first)));
|
| + MessagePipeHandle(core->AddDispatcher(remote_message_pipe.first)));
|
| // TODO(vtl): Do we properly handle the failure case here?
|
| if (rv.is_valid()) {
|
| io_thread_task_runner->PostTask(FROM_HERE,
|
|
|