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

Unified Diff: base/android/path_utils.cc

Issue 2262453002: Cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix stuff. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: base/android/path_utils.cc
diff --git a/base/android/path_utils.cc b/base/android/path_utils.cc
index 38bb20601c2744a12d2efb03036d3a57df46da8f..89ab8333ab1a71de5c72fd1405fbe53df3775272 100644
--- a/base/android/path_utils.cc
+++ b/base/android/path_utils.cc
@@ -17,8 +17,7 @@ namespace android {
bool GetDataDirectory(FilePath* result) {
JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jstring> path =
- Java_PathUtils_getDataDirectory(env, GetApplicationContext());
+ ScopedJavaLocalRef<jstring> path = Java_PathUtils_getDataDirectory(env);
FilePath data_path(ConvertJavaStringToUTF8(path));
*result = data_path;
return true;
@@ -26,8 +25,7 @@ bool GetDataDirectory(FilePath* result) {
bool GetDatabaseDirectory(FilePath* result) {
JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jstring> path =
- Java_PathUtils_getDatabaseDirectory(env, GetApplicationContext());
+ ScopedJavaLocalRef<jstring> path = Java_PathUtils_getDatabaseDirectory(env);
FilePath data_path(ConvertJavaStringToUTF8(path));
*result = data_path;
return true;
@@ -35,8 +33,7 @@ bool GetDatabaseDirectory(FilePath* result) {
bool GetCacheDirectory(FilePath* result) {
JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jstring> path =
- Java_PathUtils_getCacheDirectory(env, GetApplicationContext());
+ ScopedJavaLocalRef<jstring> path = Java_PathUtils_getCacheDirectory(env);
FilePath cache_path(ConvertJavaStringToUTF8(path));
*result = cache_path;
return true;
@@ -45,7 +42,7 @@ bool GetCacheDirectory(FilePath* result) {
bool GetThumbnailCacheDirectory(FilePath* result) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jstring> path =
- Java_PathUtils_getThumbnailCacheDirectory(env, GetApplicationContext());
+ Java_PathUtils_getThumbnailCacheDirectory(env);
FilePath thumbnail_cache_path(ConvertJavaStringToUTF8(path));
*result = thumbnail_cache_path;
return true;
@@ -53,8 +50,7 @@ bool GetThumbnailCacheDirectory(FilePath* result) {
bool GetDownloadsDirectory(FilePath* result) {
JNIEnv* env = AttachCurrentThread();
- ScopedJavaLocalRef<jstring> path =
- Java_PathUtils_getDownloadsDirectory(env, GetApplicationContext());
+ ScopedJavaLocalRef<jstring> path = Java_PathUtils_getDownloadsDirectory(env);
FilePath downloads_path(ConvertJavaStringToUTF8(path));
*result = downloads_path;
return true;
@@ -63,7 +59,7 @@ bool GetDownloadsDirectory(FilePath* result) {
bool GetNativeLibraryDirectory(FilePath* result) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jstring> path =
- Java_PathUtils_getNativeLibraryDirectory(env, GetApplicationContext());
+ Java_PathUtils_getNativeLibraryDirectory(env);
FilePath library_path(ConvertJavaStringToUTF8(path));
*result = library_path;
return true;

Powered by Google App Engine
This is Rietveld 408576698