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