Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: base/base_paths_android.cc

Issue 1926793002: 👔 Move side-loaded test data /sdcard -> /sdcard/gtestdata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 21 matching lines...) Expand all
32 *result = FilePath(bin_dir); 32 *result = FilePath(bin_dir);
33 return true; 33 return true;
34 } 34 }
35 case base::FILE_MODULE: 35 case base::FILE_MODULE:
36 // dladdr didn't work in Android as only the file name was returned. 36 // dladdr didn't work in Android as only the file name was returned.
37 NOTIMPLEMENTED(); 37 NOTIMPLEMENTED();
38 return false; 38 return false;
39 case base::DIR_MODULE: 39 case base::DIR_MODULE:
40 return base::android::GetNativeLibraryDirectory(result); 40 return base::android::GetNativeLibraryDirectory(result);
41 case base::DIR_SOURCE_ROOT: 41 case base::DIR_SOURCE_ROOT:
42 // This const is only used for tests. 42 // Used only by tests.
43 return base::android::GetExternalStorageDirectory(result); 43 // In that context, hooked up via base/test/test_support_android.cc.
44 NOTIMPLEMENTED();
45 return false;
44 case base::DIR_USER_DESKTOP: 46 case base::DIR_USER_DESKTOP:
45 // Android doesn't support GetUserDesktop. 47 // Android doesn't support GetUserDesktop.
46 NOTIMPLEMENTED(); 48 NOTIMPLEMENTED();
47 return false; 49 return false;
48 case base::DIR_CACHE: 50 case base::DIR_CACHE:
49 return base::android::GetCacheDirectory(result); 51 return base::android::GetCacheDirectory(result);
50 case base::DIR_ANDROID_APP_DATA: 52 case base::DIR_ANDROID_APP_DATA:
51 return base::android::GetDataDirectory(result); 53 return base::android::GetDataDirectory(result);
52 case base::DIR_ANDROID_EXTERNAL_STORAGE: 54 case base::DIR_ANDROID_EXTERNAL_STORAGE:
53 return base::android::GetExternalStorageDirectory(result); 55 return base::android::GetExternalStorageDirectory(result);
54 default: 56 default:
55 // Note: the path system expects this function to override the default 57 // Note: the path system expects this function to override the default
56 // behavior. So no need to log an error if we don't support a given 58 // behavior. So no need to log an error if we don't support a given
57 // path. The system will just use the default. 59 // path. The system will just use the default.
58 return false; 60 return false;
59 } 61 }
60 } 62 }
61 63
62 } // namespace base 64 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698