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

Unified Diff: chrome/browser/android/preferences/autofill/autofill_profile_bridge.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/preferences/autofill/autofill_profile_bridge.cc
diff --git a/chrome/browser/android/preferences/autofill/autofill_profile_bridge.cc b/chrome/browser/android/preferences/autofill/autofill_profile_bridge.cc
index dcf2a135595f7d4f54be83ed9894a0cdacd17780..96c6810ba19fba770069300da356231f4311fca7 100644
--- a/chrome/browser/android/preferences/autofill/autofill_profile_bridge.cc
+++ b/chrome/browser/android/preferences/autofill/autofill_profile_bridge.cc
@@ -46,18 +46,20 @@ enum AddressField {
} // namespace
-static ScopedJavaLocalRef<jstring> GetDefaultCountryCode(JNIEnv* env,
- jclass clazz) {
+static ScopedJavaLocalRef<jstring> GetDefaultCountryCode(
+ JNIEnv* env,
+ const JavaParamRef<jclass>& clazz) {
std::string default_country_code =
autofill::AutofillCountry::CountryCodeForLocale(
g_browser_process->GetApplicationLocale());
return ConvertUTF8ToJavaString(env, default_country_code);
}
-static void GetSupportedCountries(JNIEnv* env,
- jclass clazz,
- jobject j_country_code_list,
- jobject j_country_name_list) {
+static void GetSupportedCountries(
+ JNIEnv* env,
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jobject>& j_country_code_list,
+ const JavaParamRef<jobject>& j_country_name_list) {
std::vector<std::string> country_codes =
::i18n::addressinput::GetRegionCodes();
std::vector<std::string> known_country_codes;
@@ -83,11 +85,11 @@ static void GetSupportedCountries(JNIEnv* env,
static ScopedJavaLocalRef<jstring> GetAddressUiComponents(
JNIEnv* env,
- jclass clazz,
- jstring j_country_code,
- jstring j_language_code,
- jobject j_id_list,
- jobject j_name_list) {
+ const JavaParamRef<jclass>& clazz,
+ const JavaParamRef<jstring>& j_country_code,
+ const JavaParamRef<jstring>& j_language_code,
+ const JavaParamRef<jobject>& j_id_list,
+ const JavaParamRef<jobject>& j_name_list) {
std::string best_language_tag;
std::vector<int> component_ids;
std::vector<std::string> component_labels;
« no previous file with comments | « chrome/browser/android/precache/precache_launcher.cc ('k') | chrome/browser/android/preferences/pref_service_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698