Commit fbdad03f authored by Stephen Martinis's avatar Stephen Martinis Committed by Commit Bot

Revert "android: create cache dir if needed."

This reverts commit 8a7b843c.

Reason for revert: might be causing webview test failures, see https://crbug.com/1132987

Original change's description:
> android: create cache dir if needed.
>
> When using a subdirectory of the Android cache dir (e.g. in WebView),
> explicitly create the directory in PathUtils instead of relying on any
> user of the directory creating it implicitly.
>
> Set the directory mode to 02700 which is what it currently gets set to
> when created implicitly.
>
> Fixed: 963640
> Change-Id: I8e1c140241d6a2decfcd27186b767ef05e7a4320
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432447
> Reviewed-by: Anna Malova <amalova@chromium.org>
> Commit-Queue: Richard Coles <torne@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#811257}

TBR=torne@chromium.org,amalova@chromium.org

Change-Id: I29edd006d25c1189449c9368b50324d7be33f71a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436889Reviewed-by: default avatarStephen Martinis <martiniss@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811363}
parent 465489da
......@@ -108,11 +108,8 @@ public abstract class PathUtils {
if (sCacheSubDirectory == null) {
paths[CACHE_DIRECTORY] = appContext.getCacheDir().getPath();
} else {
File cacheDir = new File(appContext.getCacheDir(), sCacheSubDirectory);
assert cacheDir.mkdir();
paths[CACHE_DIRECTORY] = cacheDir.getPath();
// Set to rwx--S--- as the Android cache dir has a distinct gid and is setgid.
chmod(paths[CACHE_DIRECTORY], 02700);
paths[CACHE_DIRECTORY] =
new File(appContext.getCacheDir(), sCacheSubDirectory).getPath();
}
}
return paths;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment