• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef BASE_ANDROID_PATH_UTILS_H_
6 #define BASE_ANDROID_PATH_UTILS_H_
7 
8 #include <jni.h>
9 
10 #include "base/base_export.h"
11 
12 namespace base {
13 
14 class FilePath;
15 
16 namespace android {
17 
18 // Retrieves the absolute path to the data directory of the current
19 // application. The result is placed in the FilePath pointed to by 'result'.
20 // This method is dedicated for base_paths_android.c, Using
21 // PathService::Get(base::DIR_ANDROID_APP_DATA, ...) gets the data dir.
22 BASE_EXPORT bool GetDataDirectory(FilePath* result);
23 
24 // Retrieves the absolute path to the database directory that Android
25 // framework's SQLiteDatabase class uses when creating database files.
26 BASE_EXPORT bool GetDatabaseDirectory(FilePath* result);
27 
28 // Retrieves the absolute path to the cache directory. The result is placed in
29 // the FilePath pointed to by 'result'. This method is dedicated for
30 // base_paths_android.c, Using PathService::Get(base::DIR_CACHE, ...) gets the
31 // cache dir.
32 BASE_EXPORT bool GetCacheDirectory(FilePath* result);
33 
34 // Retrieves the path to the public downloads directory. The result is placed
35 // in the FilePath pointed to by 'result'.
36 BASE_EXPORT bool GetDownloadsDirectory(FilePath* result);
37 
38 // Retrieves the path to the native JNI libraries via
39 // ApplicationInfo.nativeLibraryDir on the Java side. The result is placed in
40 // the FilePath pointed to by 'result'.
41 BASE_EXPORT bool GetNativeLibraryDirectory(FilePath* result);
42 
43 // Retrieves the absolute path to the external storage directory. The result
44 // is placed in the FilePath pointed to by 'result'.
45 BASE_EXPORT bool GetExternalStorageDirectory(FilePath* result);
46 
47 bool RegisterPathUtils(JNIEnv* env);
48 
49 }  // namespace android
50 }  // namespace base
51 
52 #endif  // BASE_ANDROID_PATH_UTILS_H_
53