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

Side by Side Diff: base/android/java/PathUtils.java

Issue 9443018: Upstream Android's PathUtils implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/android/java/CalledByNative.java ('k') | base/android/path_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chromeview.base;
6
7 import android.content.Context;
8 import android.os.Environment;
9
10 import org.chromium.chromeview.base.CalledByNative;
11
12 import java.io.File;
13
14 /**
15 * This class provides the path related methods for the native library.
16 */
17 class PathUtils {
18
19 /**
20 * @return the private directory that used to store application data.
21 */
22 @CalledByNative
23 public static String getDataDirectory(Context appContext) {
24 return appContext.getDir("chrome", Context.MODE_PRIVATE).getPath();
joth 2012/02/23 14:07:14 base/ should not know about "chrome" at least, th
Peter Beverloo 2012/02/23 14:39:21 Added a TODO and filed an issue downstream, as it
25 }
26
27 /**
28 * @return the cache directory.
29 */
30 @CalledByNative
31 public static String getCacheDirectory(Context appContext) {
32 return appContext.getCacheDir().getPath();
33 }
34
35 /**
36 * @return the public downloads directory.
37 */
38 @CalledByNative
39 public static String getDownloadsDirectory(Context appContext) {
40 return Environment.getExternalStoragePublicDirectory(
41 Environment.DIRECTORY_DOWNLOADS).getPath();
42 }
43 }
OLDNEW
« no previous file with comments | « base/android/java/CalledByNative.java ('k') | base/android/path_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698