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

Unified Diff: trunk/src/mojo/shell/android/mojo_main.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
Index: trunk/src/mojo/shell/android/mojo_main.cc
===================================================================
--- trunk/src/mojo/shell/android/mojo_main.cc (revision 272588)
+++ trunk/src/mojo/shell/android/mojo_main.cc (working copy)
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "jni/MojoMain_jni.h"
+#include "mojo/public/cpp/environment/environment.h"
#include "mojo/public/cpp/shell/application.h"
#include "mojo/service_manager/service_loader.h"
#include "mojo/service_manager/service_manager.h"
@@ -33,6 +34,10 @@
LazyInstance<scoped_ptr<shell::Context> > g_context =
LAZY_INSTANCE_INITIALIZER;
+
+LazyInstance<scoped_ptr<mojo::Environment> > g_env =
+ LAZY_INSTANCE_INITIALIZER;
+
} // namspace
static void Init(JNIEnv* env, jclass clazz, jobject context) {
@@ -69,6 +74,8 @@
CommandLine::ForCurrentProcess()->InitFromArgv(argv);
}
+ g_env.Get().reset(new Environment);
+
base::android::ScopedJavaGlobalRef<jobject> activity;
activity.Reset(env, context);
« no previous file with comments | « trunk/src/mojo/services/view_manager/view_manager_connection_unittest.cc ('k') | trunk/src/mojo/shell/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698