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

Unified Diff: mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java

Issue 1147203002: Revert of Changes caching logic of mojo java apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java
diff --git a/mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java b/mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java
index 4af0974752189458820a133dea7b574a183adcb9..46af7465ca152e7074d376cfad5115a2ab511bbe 100644
--- a/mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java
+++ b/mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java
@@ -27,8 +27,7 @@
public class ShellMain {
private static final String TAG = "ShellMain";
- // Directory where applications cached with the shell will be extracted.
- // TODO(sky): rename this to CACHED_APP_DIRECTORY.
+ // Directory where applications bundled with the shell will be extracted.
private static final String LOCAL_APP_DIRECTORY = "local_apps";
// The mojo_shell library is also an executable run in forked processes when running
// multi-process.
@@ -73,13 +72,9 @@
if (sInitialized) return;
File localAppsDir = getLocalAppsDir(applicationContext);
try {
- final File timestamp =
- FileHelper.prepareDirectoryForAssets(applicationContext, localAppsDir);
for (String assetPath : getAssetsList(applicationContext)) {
- FileHelper.extractFromAssets(
- applicationContext, assetPath, localAppsDir, FileHelper.FileType.PERMANENT);
+ FileHelper.extractFromAssets(applicationContext, assetPath, localAppsDir, false);
}
- FileHelper.createTimestampIfNecessary(timestamp);
File mojoShell = new File(applicationContext.getApplicationInfo().nativeLibraryDir,
MOJO_SHELL_EXECUTABLE);
@@ -116,7 +111,7 @@
nativeAddApplicationURL(url);
}
- static File getLocalAppsDir(Context context) {
+ private static File getLocalAppsDir(Context context) {
return context.getDir(LOCAL_APP_DIRECTORY, Context.MODE_PRIVATE);
}
@@ -133,7 +128,7 @@
* Initializes the native system. This API should be called only once per process.
**/
private static native void nativeInit(Context context, String mojoShellPath,
- String[] parameters, String cachedAppsDirectory, String tmpDir);
+ String[] parameters, String bundledAppsDirectory, String tmpDir);
private static native boolean nativeStart();
« no previous file with comments | « mojo/runner/android/apk/src/org/chromium/mojo/shell/FileHelper.java ('k') | mojo/runner/android/bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698