1*6777b538SAndroid Build Coastguard Worker // Copyright 2012 The Chromium Authors 2*6777b538SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*6777b538SAndroid Build Coastguard Worker // found in the LICENSE file. 4*6777b538SAndroid Build Coastguard Worker 5*6777b538SAndroid Build Coastguard Worker #ifndef BASE_ANDROID_PATH_UTILS_H_ 6*6777b538SAndroid Build Coastguard Worker #define BASE_ANDROID_PATH_UTILS_H_ 7*6777b538SAndroid Build Coastguard Worker 8*6777b538SAndroid Build Coastguard Worker #include <jni.h> 9*6777b538SAndroid Build Coastguard Worker #include <vector> 10*6777b538SAndroid Build Coastguard Worker 11*6777b538SAndroid Build Coastguard Worker #include "base/base_export.h" 12*6777b538SAndroid Build Coastguard Worker 13*6777b538SAndroid Build Coastguard Worker namespace base { 14*6777b538SAndroid Build Coastguard Worker 15*6777b538SAndroid Build Coastguard Worker class FilePath; 16*6777b538SAndroid Build Coastguard Worker 17*6777b538SAndroid Build Coastguard Worker namespace android { 18*6777b538SAndroid Build Coastguard Worker 19*6777b538SAndroid Build Coastguard Worker // Retrieves the absolute path to the data directory of the current 20*6777b538SAndroid Build Coastguard Worker // application. The result is placed in the FilePath pointed to by 'result'. 21*6777b538SAndroid Build Coastguard Worker // This method is dedicated for base_paths_android.c, Using 22*6777b538SAndroid Build Coastguard Worker // PathService::Get(base::DIR_ANDROID_APP_DATA, ...) gets the data dir. 23*6777b538SAndroid Build Coastguard Worker BASE_EXPORT bool GetDataDirectory(FilePath* result); 24*6777b538SAndroid Build Coastguard Worker 25*6777b538SAndroid Build Coastguard Worker // Retrieves the absolute path to the cache directory. The result is placed in 26*6777b538SAndroid Build Coastguard Worker // the FilePath pointed to by 'result'. This method is dedicated for 27*6777b538SAndroid Build Coastguard Worker // base_paths_android.c, Using PathService::Get(base::DIR_CACHE, ...) gets the 28*6777b538SAndroid Build Coastguard Worker // cache dir. 29*6777b538SAndroid Build Coastguard Worker BASE_EXPORT bool GetCacheDirectory(FilePath* result); 30*6777b538SAndroid Build Coastguard Worker 31*6777b538SAndroid Build Coastguard Worker // Retrieves the path to the thumbnail cache directory. The result is placed 32*6777b538SAndroid Build Coastguard Worker // in the FilePath pointed to by 'result'. 33*6777b538SAndroid Build Coastguard Worker BASE_EXPORT bool GetThumbnailCacheDirectory(FilePath* result); 34*6777b538SAndroid Build Coastguard Worker 35*6777b538SAndroid Build Coastguard Worker // Retrieves the path to the public downloads directory. The result is placed 36*6777b538SAndroid Build Coastguard Worker // in the FilePath pointed to by 'result'. 37*6777b538SAndroid Build Coastguard Worker BASE_EXPORT bool GetDownloadsDirectory(FilePath* result); 38*6777b538SAndroid Build Coastguard Worker 39*6777b538SAndroid Build Coastguard Worker // Retrieves the paths to all download directories, including default storage 40*6777b538SAndroid Build Coastguard Worker // directory, and a private directory on external SD card. 41*6777b538SAndroid Build Coastguard Worker BASE_EXPORT std::vector<FilePath> GetAllPrivateDownloadsDirectories(); 42*6777b538SAndroid Build Coastguard Worker 43*6777b538SAndroid Build Coastguard Worker // Retrieves the paths to all secondary storage download directories. e.g. 44*6777b538SAndroid Build Coastguard Worker // /storage/1AEF-1A1E/Download/. 45*6777b538SAndroid Build Coastguard Worker BASE_EXPORT std::vector<FilePath> GetSecondaryStorageDownloadDirectories(); 46*6777b538SAndroid Build Coastguard Worker 47*6777b538SAndroid Build Coastguard Worker // Retrieves the path to the native JNI libraries via 48*6777b538SAndroid Build Coastguard Worker // ApplicationInfo.nativeLibraryDir on the Java side. The result is placed in 49*6777b538SAndroid Build Coastguard Worker // the FilePath pointed to by 'result'. 50*6777b538SAndroid Build Coastguard Worker BASE_EXPORT bool GetNativeLibraryDirectory(FilePath* result); 51*6777b538SAndroid Build Coastguard Worker 52*6777b538SAndroid Build Coastguard Worker // Retrieves the absolute path to the external storage directory. The result 53*6777b538SAndroid Build Coastguard Worker // is placed in the FilePath pointed to by 'result'. 54*6777b538SAndroid Build Coastguard Worker BASE_EXPORT bool GetExternalStorageDirectory(FilePath* result); 55*6777b538SAndroid Build Coastguard Worker 56*6777b538SAndroid Build Coastguard Worker } // namespace android 57*6777b538SAndroid Build Coastguard Worker } // namespace base 58*6777b538SAndroid Build Coastguard Worker 59*6777b538SAndroid Build Coastguard Worker #endif // BASE_ANDROID_PATH_UTILS_H_ 60