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

Side by Side Diff: base/base_paths_android.cc

Issue 10663039: Add Java function to retrieve the native library dir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « base/android/path_utils_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 } 30 }
31 bin_dir[bin_dir_size] = 0; 31 bin_dir[bin_dir_size] = 0;
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 *result = FilePath(base::android::GetDataDirectory()).DirName() 40 *result = FilePath(base::android::GetNativeLibraryDirectory());
Mark Mentovai 2012/07/02 18:10:16 LGTM
41 .Append("lib");
42 return true; 41 return true;
43 } 42 }
44 case base::DIR_SOURCE_ROOT: 43 case base::DIR_SOURCE_ROOT:
45 // This const is only used for tests. Files in this directory are pushed 44 // This const is only used for tests. Files in this directory are pushed
46 // to the device via test script. 45 // to the device via test script.
47 *result = FilePath(FILE_PATH_LITERAL("/data/local/tmp/")); 46 *result = FilePath(FILE_PATH_LITERAL("/data/local/tmp/"));
48 return true; 47 return true;
49 case base::DIR_CACHE: 48 case base::DIR_CACHE:
50 *result = FilePath(base::android::GetCacheDirectory()); 49 *result = FilePath(base::android::GetCacheDirectory());
51 return true; 50 return true;
52 case base::DIR_ANDROID_APP_DATA: 51 case base::DIR_ANDROID_APP_DATA:
53 *result = FilePath(base::android::GetDataDirectory()); 52 *result = FilePath(base::android::GetDataDirectory());
54 return true; 53 return true;
55 default: 54 default:
56 // Note: the path system expects this function to override the default 55 // 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 56 // behavior. So no need to log an error if we don't support a given
58 // path. The system will just use the default. 57 // path. The system will just use the default.
59 return false; 58 return false;
60 } 59 }
61 } 60 }
62 61
63 } // namespace base 62 } // namespace base
OLDNEW
« no previous file with comments | « base/android/path_utils_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698