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

Side by Side Diff: base/base_paths_android.cc

Issue 2043803003: 👔 Reland #2: Move side-loaded test data /sdcard -> /sdcard/gtestdata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase atop https://codereview.chromium.org/2041723006 Created 4 years, 6 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 20 matching lines...) Expand all
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 // This const is only used for tests. 41 // Used only by tests.
42 return base::android::GetExternalStorageDirectory(result); 42 // In that context, hooked up via base/test/test_support_android.cc.
43 NOTIMPLEMENTED();
44 return false;
43 case base::DIR_USER_DESKTOP: 45 case base::DIR_USER_DESKTOP:
44 // Android doesn't support GetUserDesktop. 46 // Android doesn't support GetUserDesktop.
45 NOTIMPLEMENTED(); 47 NOTIMPLEMENTED();
46 return false; 48 return false;
47 case base::DIR_CACHE: 49 case base::DIR_CACHE:
48 return base::android::GetCacheDirectory(result); 50 return base::android::GetCacheDirectory(result);
49 case base::DIR_ANDROID_APP_DATA: 51 case base::DIR_ANDROID_APP_DATA:
50 return base::android::GetDataDirectory(result); 52 return base::android::GetDataDirectory(result);
51 case base::DIR_ANDROID_EXTERNAL_STORAGE: 53 case base::DIR_ANDROID_EXTERNAL_STORAGE:
52 return base::android::GetExternalStorageDirectory(result); 54 return base::android::GetExternalStorageDirectory(result);
53 default: 55 default:
54 // Note: the path system expects this function to override the default 56 // Note: the path system expects this function to override the default
55 // behavior. So no need to log an error if we don't support a given 57 // behavior. So no need to log an error if we don't support a given
56 // path. The system will just use the default. 58 // path. The system will just use the default.
57 return false; 59 return false;
58 } 60 }
59 } 61 }
60 62
61 } // namespace base 63 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698