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

Side by Side Diff: base/android/path_utils.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « base/android/path_utils.h ('k') | base/android/trace_event_binding.cc » ('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 #include "base/android/path_utils.h" 5 #include "base/android/path_utils.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 23 matching lines...) Expand all
34 34
35 bool GetCacheDirectory(FilePath* result) { 35 bool GetCacheDirectory(FilePath* result) {
36 JNIEnv* env = AttachCurrentThread(); 36 JNIEnv* env = AttachCurrentThread();
37 ScopedJavaLocalRef<jstring> path = 37 ScopedJavaLocalRef<jstring> path =
38 Java_PathUtils_getCacheDirectory(env, GetApplicationContext()); 38 Java_PathUtils_getCacheDirectory(env, GetApplicationContext());
39 FilePath cache_path(ConvertJavaStringToUTF8(path)); 39 FilePath cache_path(ConvertJavaStringToUTF8(path));
40 *result = cache_path; 40 *result = cache_path;
41 return true; 41 return true;
42 } 42 }
43 43
44 bool GetThumbnailCacheDirectory(FilePath* result) {
45 JNIEnv* env = AttachCurrentThread();
46 ScopedJavaLocalRef<jstring> path =
47 Java_PathUtils_getThumbnailCacheDirectoryPath(env,
48 GetApplicationContext());
49 FilePath thumbnail_cache_path(ConvertJavaStringToUTF8(path));
50 *result = thumbnail_cache_path;
51 return true;
52 }
53
44 bool GetDownloadsDirectory(FilePath* result) { 54 bool GetDownloadsDirectory(FilePath* result) {
45 JNIEnv* env = AttachCurrentThread(); 55 JNIEnv* env = AttachCurrentThread();
46 ScopedJavaLocalRef<jstring> path = 56 ScopedJavaLocalRef<jstring> path =
47 Java_PathUtils_getDownloadsDirectory(env, GetApplicationContext()); 57 Java_PathUtils_getDownloadsDirectory(env, GetApplicationContext());
48 FilePath downloads_path(ConvertJavaStringToUTF8(path)); 58 FilePath downloads_path(ConvertJavaStringToUTF8(path));
49 *result = downloads_path; 59 *result = downloads_path;
50 return true; 60 return true;
51 } 61 }
52 62
53 bool GetNativeLibraryDirectory(FilePath* result) { 63 bool GetNativeLibraryDirectory(FilePath* result) {
(...skipping 13 matching lines...) Expand all
67 *result = storage_path; 77 *result = storage_path;
68 return true; 78 return true;
69 } 79 }
70 80
71 bool RegisterPathUtils(JNIEnv* env) { 81 bool RegisterPathUtils(JNIEnv* env) {
72 return RegisterNativesImpl(env); 82 return RegisterNativesImpl(env);
73 } 83 }
74 84
75 } // namespace android 85 } // namespace android
76 } // namespace base 86 } // namespace base
OLDNEW
« no previous file with comments | « base/android/path_utils.h ('k') | base/android/trace_event_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698