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

Side by Side Diff: base/android/java/src/org/chromium/base/PathUtils.java

Issue 10867020: Add DIR_ANDROID_EXTERNAL_STORAGE to base/base_path.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restrict to Android only. Created 8 years, 4 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 | « no previous file | base/android/path_utils.h » ('j') | 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) 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 package org.chromium.base; 5 package org.chromium.base;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.pm.ApplicationInfo; 8 import android.content.pm.ApplicationInfo;
9 import android.os.Environment; 9 import android.os.Environment;
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 @CalledByNative 66 @CalledByNative
67 private static String getNativeLibraryDirectory(Context appContext) { 67 private static String getNativeLibraryDirectory(Context appContext) {
68 ApplicationInfo ai = appContext.getApplicationInfo(); 68 ApplicationInfo ai = appContext.getApplicationInfo();
69 if ((ai.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0 || 69 if ((ai.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0 ||
70 (ai.flags & ApplicationInfo.FLAG_SYSTEM) == 0) { 70 (ai.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
71 return ai.nativeLibraryDir; 71 return ai.nativeLibraryDir;
72 } 72 }
73 73
74 return "/system/lib/"; 74 return "/system/lib/";
75 } 75 }
76
77 /**
78 * @return the external storage directory.
79 */
80 @SuppressWarnings("unused")
81 @CalledByNative
82 public static String getExternalStorageDirectory() {
83 return Environment.getExternalStorageDirectory().getAbsolutePath();
84 }
76 } 85 }
OLDNEW
« no previous file with comments | « no previous file | base/android/path_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698