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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java

Issue 2526943003: [Payments] Remove country from shipping label in bottom and fullsheet. (Closed)
Patch Set: Moved assertion Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillAddress.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
index a3624fc761d670bc207f6fbf999f84cacef2e913..a04a76d1241607815c223dc6565d396b55826d19 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java
@@ -139,6 +139,26 @@ public class PersonalDataManager {
"" /* emailAddress */, "" /* languageCode */);
}
+ /* Builds an AutofillProfile that is an exact copy of the one passed as parameter. */
+ public AutofillProfile(AutofillProfile profile) {
+ mGUID = profile.getGUID();
+ mOrigin = profile.getOrigin();
+ mIsLocal = profile.getIsLocal();
+ mFullName = profile.getFullName();
+ mCompanyName = profile.getCompanyName();
+ mStreetAddress = profile.getStreetAddress();
+ mRegion = profile.getRegion();
+ mLocality = profile.getLocality();
+ mDependentLocality = profile.getDependentLocality();
+ mPostalCode = profile.getPostalCode();
+ mSortingCode = profile.getSortingCode();
+ mCountryCode = profile.getCountryCode();
+ mPhoneNumber = profile.getPhoneNumber();
+ mEmailAddress = profile.getEmailAddress();
+ mLanguageCode = profile.getLanguageCode();
+ mLabel = profile.getLabel();
+ }
+
/** TODO(estade): remove this constructor. */
@VisibleForTesting
public AutofillProfile(String guid, String origin, String fullName, String companyName,
@@ -686,8 +706,14 @@ public class PersonalDataManager {
nativeClearUnmaskedCache(mPersonalDataManagerAndroid, guid);
}
- public String getShippingAddressLabelForPaymentRequest(AutofillProfile profile) {
- return nativeGetShippingAddressLabelForPaymentRequest(mPersonalDataManagerAndroid, profile);
+ public String getShippingAddressLabelWithCountryForPaymentRequest(AutofillProfile profile) {
+ return nativeGetShippingAddressLabelWithCountryForPaymentRequest(
+ mPersonalDataManagerAndroid, profile);
+ }
+
+ public String getShippingAddressLabelWithoutCountryForPaymentRequest(AutofillProfile profile) {
+ return nativeGetShippingAddressLabelWithoutCountryForPaymentRequest(
+ mPersonalDataManagerAndroid, profile);
}
public String getBillingAddressLabelForPaymentRequest(AutofillProfile profile) {
@@ -865,7 +891,9 @@ public class PersonalDataManager {
long nativePersonalDataManagerAndroid, AutofillProfile profile);
private native String nativeSetProfileToLocal(
long nativePersonalDataManagerAndroid, AutofillProfile profile);
- private native String nativeGetShippingAddressLabelForPaymentRequest(
+ private native String nativeGetShippingAddressLabelWithCountryForPaymentRequest(
+ long nativePersonalDataManagerAndroid, AutofillProfile profile);
+ private native String nativeGetShippingAddressLabelWithoutCountryForPaymentRequest(
long nativePersonalDataManagerAndroid, AutofillProfile profile);
private native String nativeGetBillingAddressLabelForPaymentRequest(
long nativePersonalDataManagerAndroid, AutofillProfile profile);
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillAddress.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698