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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java

Issue 2122493003: [Payments] Dedupe contact info, and phone and email editor suggestions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bauerb's comments Created 4 years, 5 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/ContactEditor.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/payments/AddressEditor.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java
index 57b69e173e2dbfcc75ed93a2b536c285f5934d4e..e895591f636ae9ef68bdc462639e41709608af2d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/AddressEditor.java
@@ -20,7 +20,6 @@ import org.chromium.chrome.browser.preferences.autofill.AutofillProfileBridge;
import org.chromium.chrome.browser.preferences.autofill.AutofillProfileBridge.AddressField;
import org.chromium.chrome.browser.preferences.autofill.AutofillProfileBridge.AddressUiComponent;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -34,9 +33,9 @@ import javax.annotation.Nullable;
* An address editor. Can be used for either shipping or billing address editing.
*/
public class AddressEditor extends EditorBase<AutofillAddress> {
- private final Handler mHandler;
- private final Map<Integer, EditorFieldModel> mAddressFields;
- private final List<CharSequence> mPhoneNumbers;
+ private final Handler mHandler = new Handler();
+ private final Map<Integer, EditorFieldModel> mAddressFields = new HashMap<>();
+ private final Set<CharSequence> mPhoneNumbers = new HashSet<>();
@Nullable private AutofillProfileBridge mAutofillProfileBridge;
@Nullable private EditorFieldModel mCountryField;
@Nullable private EditorFieldModel mPhoneField;
@@ -44,15 +43,6 @@ public class AddressEditor extends EditorBase<AutofillAddress> {
@Nullable private List<AddressUiComponent> mAddressUiComponents;
/**
- * Builds an address editor.
- */
- public AddressEditor() {
- mHandler = new Handler();
- mAddressFields = new HashMap<>();
- mPhoneNumbers = new ArrayList<>();
- }
-
- /**
* Returns whether the given profile can be sent to the merchant as-is without editing first. If
* the country code is not set or invalid, but all fields for the default locale's country code
* are present, then the profile is deemed "complete." AutoflllAddress.toPaymentAddress() will
@@ -78,7 +68,7 @@ public class AddressEditor extends EditorBase<AutofillAddress> {
}
/**
- * Adds the given phone number to the autocomplete list, if it's valid.
+ * Adds the given phone number to the autocomplete set, if it's valid.
*
* @param phoneNumber The phone number to possibly add.
*/
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/ContactEditor.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698