Index: chrome/browser/android/profiles/profile_downloader_android.cc |
diff --git a/chrome/browser/android/profiles/profile_downloader_android.cc b/chrome/browser/android/profiles/profile_downloader_android.cc |
index c0914d59454adce3d81dfda3b911b811438cca07..9560c8688455da5656f959884ac730a084c5de74 100644 |
--- a/chrome/browser/android/profiles/profile_downloader_android.cc |
+++ b/chrome/browser/android/profiles/profile_downloader_android.cc |
@@ -120,10 +120,9 @@ |
} // namespace |
// static |
-ScopedJavaLocalRef<jstring> GetCachedFullNameForPrimaryAccount( |
- JNIEnv* env, |
- jclass clazz, |
- jobject jprofile) { |
+jstring GetCachedFullNameForPrimaryAccount(JNIEnv* env, |
+ jclass clazz, |
+ jobject jprofile) { |
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); |
ProfileInfoInterface& info = |
g_browser_process->profile_manager()->GetProfileInfoCache(); |
@@ -133,14 +132,13 @@ |
if (index != std::string::npos) |
name = info.GetGAIANameOfProfileAtIndex(index); |
- return base::android::ConvertUTF16ToJavaString(env, name); |
-} |
- |
-// static |
-ScopedJavaLocalRef<jstring> GetCachedGivenNameForPrimaryAccount( |
- JNIEnv* env, |
- jclass clazz, |
- jobject jprofile) { |
+ return base::android::ConvertUTF16ToJavaString(env, name).Release(); |
+} |
+ |
+// static |
+jstring GetCachedGivenNameForPrimaryAccount(JNIEnv* env, |
+ jclass clazz, |
+ jobject jprofile) { |
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); |
ProfileInfoInterface& info = |
g_browser_process->profile_manager()->GetProfileInfoCache(); |
@@ -150,13 +148,13 @@ |
if (index != std::string::npos) |
name = info.GetGAIAGivenNameOfProfileAtIndex(index); |
- return base::android::ConvertUTF16ToJavaString(env, name); |
-} |
- |
-// static |
-ScopedJavaLocalRef<jobject> GetCachedAvatarForPrimaryAccount(JNIEnv* env, |
- jclass clazz, |
- jobject jprofile) { |
+ return base::android::ConvertUTF16ToJavaString(env, name).Release(); |
+} |
+ |
+// static |
+jobject GetCachedAvatarForPrimaryAccount(JNIEnv* env, |
+ jclass clazz, |
+ jobject jprofile) { |
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); |
ProfileInfoInterface& info = |
g_browser_process->profile_manager()->GetProfileInfoCache(); |
@@ -173,7 +171,7 @@ |
} |
} |
- return jbitmap; |
+ return jbitmap.Release(); |
} |
// static |