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

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

Issue 2472043003: [Payments] Don't show Organization in billing address selection label. (Closed)
Patch Set: Updated test + Addressed Dan's comment 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/CardEditor.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 c7bc193cc25eb1c169f381a5d7ec5204c69dc00c..84d1e1fb2b477a71877f12ffcdad78a84d4bc804 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
@@ -530,8 +530,9 @@ public class PersonalDataManager {
mDataObservers.remove(observer);
}
- // TODO(crbug.com/616102): Reduce the number of Java to Native calls when getting profiles.
/**
+ * TODO(crbug.com/616102): Reduce the number of Java to Native calls when getting profiles.
+ *
* Gets the profiles to show in the settings page. Returns all the profiles without any
* processing.
*
@@ -543,8 +544,9 @@ public class PersonalDataManager {
nativeGetProfileGUIDsForSettings(mPersonalDataManagerAndroid));
}
- // TODO(crbug.com/616102): Reduce the number of Java to Native calls when getting profiles.
/**
+ * TODO(crbug.com/616102): Reduce the number of Java to Native calls when getting profiles
+ *
* Gets the profiles to suggest when filling a form or completing a transaction. The profiles
* will have been processed to be more relevant to the user.
*
@@ -555,7 +557,25 @@ public class PersonalDataManager {
ThreadUtils.assertOnUiThread();
return getProfilesWithLabels(
nativeGetProfileLabelsToSuggest(
- mPersonalDataManagerAndroid, includeNameInLabel),
+ mPersonalDataManagerAndroid, includeNameInLabel,
+ true /* includeOrganizationInLabel */, true /* includeCountryInLabel */),
+ nativeGetProfileGUIDsToSuggest(mPersonalDataManagerAndroid));
+ }
+
+ /**
+ * TODO(crbug.com/616102): Reduce the number of Java to Native calls when getting profiles.
+ *
+ * Gets the profiles to suggest when associating a billing address to a credit card. The
+ * profiles will have been processed to be more relevant to the user.
+ *
+ * @return The list of billing addresses to suggest to the user.
+ */
+ public List<AutofillProfile> getBillingAddressesToSuggest() {
+ ThreadUtils.assertOnUiThread();
+ return getProfilesWithLabels(
+ nativeGetProfileLabelsToSuggest(
+ mPersonalDataManagerAndroid, true /* includeNameInLabel */,
+ false /* includeOrganizationInLabel */, false /* includeCountryInLabel */),
nativeGetProfileGUIDsToSuggest(mPersonalDataManagerAndroid));
}
@@ -824,7 +844,8 @@ public class PersonalDataManager {
private native String[] nativeGetProfileLabelsForSettings(
long nativePersonalDataManagerAndroid);
private native String[] nativeGetProfileLabelsToSuggest(long nativePersonalDataManagerAndroid,
- boolean includeNameInLabel);
+ boolean includeNameInLabel, boolean includeOrganizationInLabel,
+ boolean includeCountryInLabel);
private native AutofillProfile nativeGetProfileByGUID(long nativePersonalDataManagerAndroid,
String guid);
private native String nativeSetProfile(long nativePersonalDataManagerAndroid,
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/CardEditor.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698