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

Unified Diff: android/java/src/org/chromium/base/PathUtils.java

Issue 2050803003: Update to Chromium //base at Chromium commit e3a753f17bac62738b0dbf0b36510f767b081e4b. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 years, 6 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 | « android/java/src/org/chromium/base/Log.java ('k') | android/java/src/org/chromium/base/README_logging.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android/java/src/org/chromium/base/PathUtils.java
diff --git a/android/java/src/org/chromium/base/PathUtils.java b/android/java/src/org/chromium/base/PathUtils.java
index 58b54ff527bc9c7a67c7e22b75998bc0458273d9..6f29732c786e86b903cc335c9506948e6eeca2ba 100644
--- a/android/java/src/org/chromium/base/PathUtils.java
+++ b/android/java/src/org/chromium/base/PathUtils.java
@@ -23,8 +23,7 @@ public abstract class PathUtils {
private static final int DATA_DIRECTORY = 0;
private static final int DATABASE_DIRECTORY = 1;
private static final int CACHE_DIRECTORY = 2;
- private static final int DOWNLOADS_DIRECTORY = 3;
- private static final int NUM_DIRECTORIES = 4;
+ private static final int NUM_DIRECTORIES = 3;
private static AsyncTask<String, Void, String[]> sDirPathFetchTask;
private static File sThumbnailDirectory;
@@ -50,12 +49,7 @@ public abstract class PathUtils {
paths[DATABASE_DIRECTORY] = appContext.getDatabasePath("foo").getParent();
// TODO(wnwen): Find a way to avoid calling this function in renderer process.
if (appContext.getCacheDir() != null) {
- // These paths are only available in the browser process.
paths[CACHE_DIRECTORY] = appContext.getCacheDir().getPath();
- paths[DOWNLOADS_DIRECTORY] = Environment
- .getExternalStoragePublicDirectory(
- Environment.DIRECTORY_DOWNLOADS)
- .getPath();
}
return paths;
}
@@ -121,8 +115,8 @@ public abstract class PathUtils {
@SuppressWarnings("unused")
@CalledByNative
private static String getDownloadsDirectory(Context appContext) {
- assert sDirPathFetchTask != null : "setDataDirectorySuffix must be called first.";
- return getDirectoryPath(DOWNLOADS_DIRECTORY);
+ return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
+ .getPath();
}
/**
« no previous file with comments | « android/java/src/org/chromium/base/Log.java ('k') | android/java/src/org/chromium/base/README_logging.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698