| 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 // Defines base::PathProviderAndroid which replaces base::PathProviderPosix for | 5 // Defines base::PathProviderAndroid which replaces base::PathProviderPosix for |
| 6 // Android in base/path_service.cc. | 6 // Android in base/path_service.cc. |
| 7 | 7 |
| 8 #include <limits.h> | 8 #include <limits.h> |
| 9 #include <unistd.h> | 9 #include <unistd.h> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 *result = FilePath(bin_dir); | 31 *result = FilePath(bin_dir); |
| 32 return true; | 32 return true; |
| 33 } | 33 } |
| 34 case base::FILE_MODULE: | 34 case base::FILE_MODULE: |
| 35 // dladdr didn't work in Android as only the file name was returned. | 35 // dladdr didn't work in Android as only the file name was returned. |
| 36 NOTIMPLEMENTED(); | 36 NOTIMPLEMENTED(); |
| 37 return false; | 37 return false; |
| 38 case base::DIR_MODULE: | 38 case base::DIR_MODULE: |
| 39 return base::android::GetNativeLibraryDirectory(result); | 39 return base::android::GetNativeLibraryDirectory(result); |
| 40 case base::DIR_SOURCE_ROOT: | 40 case base::DIR_SOURCE_ROOT: |
| 41 // Used only by tests. | 41 // This const is only used for tests. |
| 42 // In that context, hooked up via base/test/test_support_android.cc. | 42 return base::android::GetExternalStorageDirectory(result); |
| 43 NOTIMPLEMENTED(); | |
| 44 return false; | |
| 45 case base::DIR_USER_DESKTOP: | 43 case base::DIR_USER_DESKTOP: |
| 46 // Android doesn't support GetUserDesktop. | 44 // Android doesn't support GetUserDesktop. |
| 47 NOTIMPLEMENTED(); | 45 NOTIMPLEMENTED(); |
| 48 return false; | 46 return false; |
| 49 case base::DIR_CACHE: | 47 case base::DIR_CACHE: |
| 50 return base::android::GetCacheDirectory(result); | 48 return base::android::GetCacheDirectory(result); |
| 51 case base::DIR_ANDROID_APP_DATA: | 49 case base::DIR_ANDROID_APP_DATA: |
| 52 return base::android::GetDataDirectory(result); | 50 return base::android::GetDataDirectory(result); |
| 53 case base::DIR_ANDROID_EXTERNAL_STORAGE: | 51 case base::DIR_ANDROID_EXTERNAL_STORAGE: |
| 54 return base::android::GetExternalStorageDirectory(result); | 52 return base::android::GetExternalStorageDirectory(result); |
| 55 default: | 53 default: |
| 56 // Note: the path system expects this function to override the default | 54 // Note: the path system expects this function to override the default |
| 57 // behavior. So no need to log an error if we don't support a given | 55 // behavior. So no need to log an error if we don't support a given |
| 58 // path. The system will just use the default. | 56 // path. The system will just use the default. |
| 59 return false; | 57 return false; |
| 60 } | 58 } |
| 61 } | 59 } |
| 62 | 60 |
| 63 } // namespace base | 61 } // namespace base |
| OLD | NEW |