| Index: base/android/path_utils.cc
|
| diff --git a/base/android/path_utils.cc b/base/android/path_utils.cc
|
| index dc45c28da622dfbab06c0f3b49b35fff02dd6f71..c46e6693aaff9590e2d5422c56589ca8fcbd9ef2 100644
|
| --- a/base/android/path_utils.cc
|
| +++ b/base/android/path_utils.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -15,16 +15,23 @@ namespace android {
|
|
|
| std::string GetDataDirectory() {
|
| JNIEnv* env = AttachCurrentThread();
|
| - ScopedJavaLocalRef<jstring> path(env, Java_PathUtils_getDataDirectory(
|
| - env, base::android::GetApplicationContext()));
|
| - return base::android::ConvertJavaStringToUTF8(env, path.obj());
|
| + ScopedJavaLocalRef<jstring> path =
|
| + Java_PathUtils_getDataDirectory(env, GetApplicationContext());
|
| + return ConvertJavaStringToUTF8(path);
|
| }
|
|
|
| std::string GetCacheDirectory() {
|
| JNIEnv* env = AttachCurrentThread();
|
| - ScopedJavaLocalRef<jstring> path(env, Java_PathUtils_getCacheDirectory(
|
| - env, base::android::GetApplicationContext()));
|
| - return base::android::ConvertJavaStringToUTF8(env, path.obj());
|
| + ScopedJavaLocalRef<jstring> path =
|
| + Java_PathUtils_getCacheDirectory(env, GetApplicationContext());
|
| + return ConvertJavaStringToUTF8(path);
|
| +}
|
| +
|
| +std::string GetDownloadsDirectory() {
|
| + JNIEnv* env = AttachCurrentThread();
|
| + ScopedJavaLocalRef<jstring> path =
|
| + Java_PathUtils_getDownloadsDirectory(env, GetApplicationContext());
|
| + return ConvertJavaStringToUTF8(path);
|
| }
|
|
|
| bool RegisterPathUtils(JNIEnv* env) {
|
|
|