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

Unified Diff: trunk/src/content/app/mojo/mojo_init.cc

Issue 299263002: Revert 272472 "Mojo: nuke EnvironmentData" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | « trunk/src/content/app/mojo/mojo_init.h ('k') | trunk/src/content/test/content_test_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/app/mojo/mojo_init.cc
===================================================================
--- trunk/src/content/app/mojo/mojo_init.cc (revision 272588)
+++ trunk/src/content/app/mojo/mojo_init.cc (working copy)
@@ -6,13 +6,27 @@
#include "base/logging.h"
#include "mojo/embedder/embedder.h"
+#include "mojo/public/cpp/environment/environment.h"
#include "mojo/service_manager/service_manager.h"
namespace content {
+namespace {
+
+mojo::Environment* environment = NULL;
+
+} // namespace
+
void InitializeMojo() {
+ DCHECK(!environment);
+ environment = new mojo::Environment;
mojo::embedder::Init();
mojo::ServiceManager::GetInstance();
}
+void ShutdownMojo() {
+ delete environment;
+ environment = NULL;
+}
+
} // namespace content
« no previous file with comments | « trunk/src/content/app/mojo/mojo_init.h ('k') | trunk/src/content/test/content_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698