| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_ANDROID_PATH_UTILS_H_ | 5 #ifndef BASE_ANDROID_PATH_UTILS_H_ |
| 6 #define BASE_ANDROID_PATH_UTILS_H_ | 6 #define BASE_ANDROID_PATH_UTILS_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/base_export.h" |
| 11 |
| 10 class FilePath; | 12 class FilePath; |
| 11 | 13 |
| 12 namespace base { | 14 namespace base { |
| 13 namespace android { | 15 namespace android { |
| 14 | 16 |
| 15 // Retrieves the absolute path to the data directory of the current | 17 // Retrieves the absolute path to the data directory of the current |
| 16 // application. The result is placed in the FilePath pointed to by 'result'. | 18 // application. The result is placed in the FilePath pointed to by 'result'. |
| 17 // This method is dedicated for base_paths_android.c, Using | 19 // This method is dedicated for base_paths_android.c, Using |
| 18 // PathService::Get(base::DIR_ANDROID_APP_DATA, ...) gets the data dir. | 20 // PathService::Get(base::DIR_ANDROID_APP_DATA, ...) gets the data dir. |
| 19 bool GetDataDirectory(FilePath* result); | 21 BASE_EXPORT bool GetDataDirectory(FilePath* result); |
| 20 | 22 |
| 21 // Retrieves the absolute path to the cache directory. The result is placed in | 23 // Retrieves the absolute path to the cache directory. The result is placed in |
| 22 // the FilePath pointed to by 'result'. This method is dedicated for | 24 // the FilePath pointed to by 'result'. This method is dedicated for |
| 23 // base_paths_android.c, Using PathService::Get(base::DIR_CACHE, ...) gets the | 25 // base_paths_android.c, Using PathService::Get(base::DIR_CACHE, ...) gets the |
| 24 // cache dir. | 26 // cache dir. |
| 25 bool GetCacheDirectory(FilePath* result); | 27 BASE_EXPORT bool GetCacheDirectory(FilePath* result); |
| 26 | 28 |
| 27 // Retrieves the path to the public downloads directory. The result is placed | 29 // Retrieves the path to the public downloads directory. The result is placed |
| 28 // in the FilePath pointed to by 'result'. | 30 // in the FilePath pointed to by 'result'. |
| 29 bool GetDownloadsDirectory(FilePath* result); | 31 bool GetDownloadsDirectory(FilePath* result); |
| 30 | 32 |
| 31 // Retrieves the path to the native JNI libraries via | 33 // Retrieves the path to the native JNI libraries via |
| 32 // ApplicationInfo.nativeLibraryDir on the Java side. The result is placed in | 34 // ApplicationInfo.nativeLibraryDir on the Java side. The result is placed in |
| 33 // the FilePath pointed to by 'result'. | 35 // the FilePath pointed to by 'result'. |
| 34 bool GetNativeLibraryDirectory(FilePath* result); | 36 bool GetNativeLibraryDirectory(FilePath* result); |
| 35 | 37 |
| 36 // Retrieves the absolute path to the external storage directory. The result | 38 // Retrieves the absolute path to the external storage directory. The result |
| 37 // is placed in the FilePath pointed to by 'result'. | 39 // is placed in the FilePath pointed to by 'result'. |
| 38 bool GetExternalStorageDirectory(FilePath* result); | 40 BASE_EXPORT bool GetExternalStorageDirectory(FilePath* result); |
| 39 | 41 |
| 40 bool RegisterPathUtils(JNIEnv* env); | 42 bool RegisterPathUtils(JNIEnv* env); |
| 41 | 43 |
| 42 } // namespace android | 44 } // namespace android |
| 43 } // namespace base | 45 } // namespace base |
| 44 | 46 |
| 45 #endif // BASE_ANDROID_PATH_UTILS_H_ | 47 #endif // BASE_ANDROID_PATH_UTILS_H_ |
| OLD | NEW |