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

Unified Diff: mojo/embedder/embedder.cc

Issue 231353002: Make mojo_system static and mojo_system_impl a component, never use both (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 6 years, 8 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
Index: mojo/embedder/embedder.cc
diff --git a/mojo/embedder/embedder.cc b/mojo/embedder/embedder.cc
index ed6aecfec1df3cadbfd2a7df21d1d8c4db29d616..52ac523ca9d6361edc7509d186c119164943260c 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"
@@ -54,10 +54,6 @@ static void CreateChannelOnIOThread(
}
}
-void Init() {
viettrungluu 2014/04/09 20:26:52 Please don't do this.
DaveMoore 2014/04/09 22:49:08 Done.
- Core::Init(new system::CoreImpl());
-}
-
ScopedMessagePipeHandle CreateChannel(
ScopedPlatformHandle platform_handle,
scoped_refptr<base::TaskRunner> io_thread_task_runner,
@@ -69,10 +65,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,

Powered by Google App Engine
This is Rietveld 408576698