OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/base_paths.h" | 5 #include "base/base_paths.h" |
6 | 6 |
7 #include <unistd.h> | 7 #include <unistd.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/path_utils.h" | 10 #include "base/android/path_utils.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // This const is only used for tests. Files in this directory are pushed | 45 // This const is only used for tests. Files in this directory are pushed |
46 // to the device via test script. | 46 // to the device via test script. |
47 *result = FilePath(FILE_PATH_LITERAL("/data/local/tmp/")); | 47 *result = FilePath(FILE_PATH_LITERAL("/data/local/tmp/")); |
48 return true; | 48 return true; |
49 case base::DIR_CACHE: | 49 case base::DIR_CACHE: |
50 *result = FilePath(base::android::GetCacheDirectory()); | 50 *result = FilePath(base::android::GetCacheDirectory()); |
51 return true; | 51 return true; |
52 case base::DIR_ANDROID_APP_DATA: | 52 case base::DIR_ANDROID_APP_DATA: |
53 *result = FilePath(base::android::GetDataDirectory()); | 53 *result = FilePath(base::android::GetDataDirectory()); |
54 return true; | 54 return true; |
| 55 case base::DIR_MEDIA_LIBS: |
| 56 if (!PathService::Get(base::DIR_MODULE, result)) |
| 57 return false; |
| 58 return true; |
55 default: | 59 default: |
56 // Note: the path system expects this function to override the default | 60 // 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 | 61 // behavior. So no need to log an error if we don't support a given |
58 // path. The system will just use the default. | 62 // path. The system will just use the default. |
59 return false; | 63 return false; |
60 } | 64 } |
61 } | 65 } |
62 | 66 |
63 } // namespace base | 67 } // namespace base |
OLD | NEW |