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 #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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 return true; | 53 return true; |
54 } | 54 } |
55 case base::DIR_ANDROID_APP_DATA: { | 55 case base::DIR_ANDROID_APP_DATA: { |
56 *result = FilePath(base::android::GetDataDirectory()); | 56 *result = FilePath(base::android::GetDataDirectory()); |
57 return true; | 57 return true; |
58 } | 58 } |
59 case base::DIR_HOME: { | 59 case base::DIR_HOME: { |
60 *result = file_util::GetHomeDir(); | 60 *result = file_util::GetHomeDir(); |
61 return true; | 61 return true; |
62 } | 62 } |
| 63 case base::DIR_ANDROID_EXTERNAL_STORAGE: { |
| 64 *result = FilePath(base::android::GetExternalStorageDirectory()); |
| 65 return true; |
| 66 } |
63 default: { | 67 default: { |
64 // Note: the path system expects this function to override the default | 68 // Note: the path system expects this function to override the default |
65 // behavior. So no need to log an error if we don't support a given | 69 // behavior. So no need to log an error if we don't support a given |
66 // path. The system will just use the default. | 70 // path. The system will just use the default. |
67 return false; | 71 return false; |
68 } | 72 } |
69 } | 73 } |
70 } | 74 } |
71 | 75 |
72 } // namespace base | 76 } // namespace base |
OLD | NEW |