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

Unified Diff: content/common/mojo/mojo_channel_init.cc

Issue 213313004: Add creation of ServiceManager to Content (2nd try) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add shell_client to mojo_pepper_container_app Created 6 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 | « content/common/mojo/mojo_channel_init.h ('k') | content/content_app.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/mojo_channel_init.cc
diff --git a/content/common/mojo/mojo_channel_init.cc b/content/common/mojo/mojo_channel_init.cc
index 295cb6db21d743a17063da8ee49043f1d48fdf5d..16661ab1121f874d2d3d2d36ee66c2aa3cbfe6cc 100644
--- a/content/common/mojo/mojo_channel_init.cc
+++ b/content/common/mojo/mojo_channel_init.cc
@@ -5,24 +5,11 @@
#include "content/common/mojo/mojo_channel_init.h"
#include "base/bind.h"
-#include "base/lazy_instance.h"
#include "base/message_loop/message_loop.h"
-#include "base/synchronization/lock.h"
#include "mojo/embedder/embedder.h"
namespace content {
-namespace {
-
-struct Initializer {
- Initializer() {
- mojo::embedder::Init();
- }
-};
-
-
-} // namespace
-
MojoChannelInit::MojoChannelInit()
: channel_info_(NULL),
weak_factory_(this) {
@@ -37,22 +24,11 @@ MojoChannelInit::~MojoChannelInit() {
}
}
-// static
-void MojoChannelInit::InitMojo() {
- static base::LazyInstance<Initializer>::Leaky initializer =
- LAZY_INSTANCE_INITIALIZER;
- // Initializes mojo. Use a lazy instance to ensure we only do this once.
- // TODO(sky): this likely wants to move to a more central location, such as
- // startup.
- initializer.Get();
-}
-
void MojoChannelInit::Init(
base::PlatformFile file,
scoped_refptr<base::TaskRunner> io_thread_task_runner) {
DCHECK(!io_thread_task_runner_.get()); // Should only init once.
io_thread_task_runner_ = io_thread_task_runner;
- InitMojo();
bootstrap_message_pipe_ = mojo::embedder::CreateChannel(
mojo::embedder::ScopedPlatformHandle(
mojo::embedder::PlatformHandle(file)),
« no previous file with comments | « content/common/mojo/mojo_channel_init.h ('k') | content/content_app.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698