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

Unified Diff: shell/android/main.cc

Issue 1088533003: Adding URLResponse Disk Cache to mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 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 | « shell/android/background_application_loader_unittest.cc ('k') | shell/application_manager/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/android/main.cc
diff --git a/shell/android/main.cc b/shell/android/main.cc
index ac72bcb8eb52a03dfdc588d2f357a8c71bfd3beb..299fc5a3286197121be43b0083bb9a9ed7f90041 100644
--- a/shell/android/main.cc
+++ b/shell/android/main.cc
@@ -24,10 +24,10 @@
#include "mojo/common/message_pump_mojo.h"
#include "mojo/services/window_manager/public/interfaces/window_manager.mojom.h"
#include "shell/android/android_handler_loader.h"
-#include "shell/android/background_application_loader.h"
#include "shell/android/native_viewport_application_loader.h"
#include "shell/android/ui_application_loader_android.h"
#include "shell/application_manager/application_loader.h"
+#include "shell/background_application_loader.h"
#include "shell/command_line_util.h"
#include "shell/context.h"
#include "shell/init.h"
@@ -181,17 +181,23 @@ static void Init(JNIEnv* env,
jstring mojo_shell_child_path,
jobjectArray jparameters,
jstring j_local_apps_directory,
- jstring j_tmp_dir) {
+ jstring j_tmp_dir,
+ jstring j_home_dir) {
g_internal_data.Get().main_activity.Reset(env, activity);
// Initially, the shell runner is not ready.
g_internal_data.Get().shell_runner_ready.reset(
new base::WaitableEvent(true, false));
std::string tmp_dir = base::android::ConvertJavaStringToUTF8(env, j_tmp_dir);
- // Setting the TMPDIR environment variable so that applications can use it.
+ // Setting the TMPDIR and HOME environment variables so that applications can
+ // use it.
// TODO(qsr) We will need our subprocesses to inherit this.
int return_value = setenv("TMPDIR", tmp_dir.c_str(), 1);
DCHECK_EQ(return_value, 0);
+ return_value = setenv(
+ "HOME", base::android::ConvertJavaStringToUTF8(env, j_home_dir).c_str(),
+ 1);
+ DCHECK_EQ(return_value, 0);
base::android::ScopedJavaLocalRef<jobject> scoped_activity(env, activity);
base::android::InitApplicationContext(env, scoped_activity);
« no previous file with comments | « shell/android/background_application_loader_unittest.cc ('k') | shell/application_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698