| Index: chrome/browser/autofill/android/personal_data_manager_android.cc
|
| diff --git a/chrome/browser/autofill/android/personal_data_manager_android.cc b/chrome/browser/autofill/android/personal_data_manager_android.cc
|
| index b7e3cd458eaaec3a8aa04532e97fb3ae0e468aee..7de6fd815d4a1155705443f4fda2f1925919d198 100644
|
| --- a/chrome/browser/autofill/android/personal_data_manager_android.cc
|
| +++ b/chrome/browser/autofill/android/personal_data_manager_android.cc
|
| @@ -430,10 +430,12 @@ PersonalDataManagerAndroid::GetProfileLabelsToSuggest(
|
| }
|
|
|
| base::android::ScopedJavaLocalRef<jstring>
|
| -PersonalDataManagerAndroid::GetAddressLabelForPaymentRequest(
|
| +PersonalDataManagerAndroid::GetShippingAddressLabelForPaymentRequest(
|
| JNIEnv* env,
|
| const base::android::JavaParamRef<jobject>& unused_obj,
|
| const base::android::JavaParamRef<jobject>& jprofile) {
|
| + // The full name is not included in the label for shipping address. It is
|
| + // added separately instead.
|
| std::vector<ServerFieldType> label_fields;
|
| label_fields.push_back(COMPANY_NAME);
|
| label_fields.push_back(ADDRESS_HOME_LINE1);
|
| @@ -454,6 +456,31 @@ PersonalDataManagerAndroid::GetAddressLabelForPaymentRequest(
|
| g_browser_process->GetApplicationLocale()));
|
| }
|
|
|
| +base::android::ScopedJavaLocalRef<jstring>
|
| +PersonalDataManagerAndroid::GetBillingAddressLabelForPaymentRequest(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& unused_obj,
|
| + const base::android::JavaParamRef<jobject>& jprofile) {
|
| + // The company name and country are not included in the billing address label.
|
| + std::vector<ServerFieldType> label_fields;
|
| + label_fields.push_back(NAME_FULL);
|
| + label_fields.push_back(ADDRESS_HOME_LINE1);
|
| + label_fields.push_back(ADDRESS_HOME_LINE2);
|
| + label_fields.push_back(ADDRESS_HOME_DEPENDENT_LOCALITY);
|
| + label_fields.push_back(ADDRESS_HOME_CITY);
|
| + label_fields.push_back(ADDRESS_HOME_STATE);
|
| + label_fields.push_back(ADDRESS_HOME_ZIP);
|
| + label_fields.push_back(ADDRESS_HOME_SORTING_CODE);
|
| +
|
| + AutofillProfile profile;
|
| + PopulateNativeProfileFromJava(jprofile, env, &profile);
|
| +
|
| + return ConvertUTF16ToJavaString(
|
| + env, profile.ConstructInferredLabel(
|
| + label_fields, label_fields.size(),
|
| + g_browser_process->GetApplicationLocale()));
|
| +}
|
| +
|
| base::android::ScopedJavaLocalRef<jobjectArray>
|
| PersonalDataManagerAndroid::GetCreditCardGUIDsForSettings(
|
| JNIEnv* env,
|
|
|