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

Unified Diff: chrome/browser/android/profiles/profile_downloader_android.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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: 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..f2162d0b461cb10baac1b52b22c25e5b02c8891f 100644
--- a/chrome/browser/android/profiles/profile_downloader_android.cc
+++ b/chrome/browser/android/profiles/profile_downloader_android.cc
@@ -122,8 +122,8 @@ class AccountInfoRetriever : public ProfileDownloaderDelegate {
// static
ScopedJavaLocalRef<jstring> GetCachedFullNameForPrimaryAccount(
JNIEnv* env,
- jclass clazz,
- jobject jprofile) {
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& jprofile) {
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
ProfileInfoInterface& info =
g_browser_process->profile_manager()->GetProfileInfoCache();
@@ -139,8 +139,8 @@ ScopedJavaLocalRef<jstring> GetCachedFullNameForPrimaryAccount(
// static
ScopedJavaLocalRef<jstring> GetCachedGivenNameForPrimaryAccount(
JNIEnv* env,
- jclass clazz,
- jobject jprofile) {
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& jprofile) {
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
ProfileInfoInterface& info =
g_browser_process->profile_manager()->GetProfileInfoCache();
@@ -154,9 +154,10 @@ ScopedJavaLocalRef<jstring> GetCachedGivenNameForPrimaryAccount(
}
// static
-ScopedJavaLocalRef<jobject> GetCachedAvatarForPrimaryAccount(JNIEnv* env,
- jclass clazz,
- jobject jprofile) {
+ScopedJavaLocalRef<jobject> GetCachedAvatarForPrimaryAccount(
+ JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& jprofile) {
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
ProfileInfoInterface& info =
g_browser_process->profile_manager()->GetProfileInfoCache();
@@ -177,13 +178,12 @@ ScopedJavaLocalRef<jobject> GetCachedAvatarForPrimaryAccount(JNIEnv* env,
}
// static
-void StartFetchingAccountInfoFor(
- JNIEnv* env,
- jclass clazz,
- jobject jprofile,
- jstring jemail,
- jint image_side_pixels,
- jboolean is_pre_signin) {
+void StartFetchingAccountInfoFor(JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& jprofile,
+ const JavaParamRef<jstring>& jemail,
+ jint image_side_pixels,
+ jboolean is_pre_signin) {
Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
const std::string email =
base::android::ConvertJavaStringToUTF8(env, jemail);

Powered by Google App Engine
This is Rietveld 408576698