Index: components/payments/core/payments_profile_comparator.h |
diff --git a/components/payments/core/payments_profile_comparator.h b/components/payments/core/payments_profile_comparator.h |
index 2c8b934ad81204400dce0073105f89cc2a351ac7..d2b7afa71d5ab29f7de470b73790667f2d46b5e1 100644 |
--- a/components/payments/core/payments_profile_comparator.h |
+++ b/components/payments/core/payments_profile_comparator.h |
@@ -76,15 +76,27 @@ class PaymentsProfileComparator : public autofill::AutofillProfileComparator { |
bool IsContactMoreComplete(const autofill::AutofillProfile* p1, |
const autofill::AutofillProfile* p2) const; |
- // Returns a localized string to be displayed in UI indicating what action, |
- // if any, must be taken for the given profile to be used as contact info. |
- base::string16 GetStringForMissingContactFields( |
- const autofill::AutofillProfile& profile) const; |
+ // Returns profiles for shipping, ordered by completeness. |profiles| should |
+ // be passed in order of frecency, and this order will be preserved among |
+ // equally-complete profiles. |
+ std::vector<autofill::AutofillProfile*> FilterProfilesForShipping( |
+ const std::vector<autofill::AutofillProfile*>& profiles) const; |
+ |
+ int GetShippingCompletenessScore( |
Mathieu
2017/05/16 20:16:51
can some of these functions be private?
tmartino
2017/05/18 20:49:37
FilterProfilesForShipping: used by State
GetShippi
|
+ const autofill::AutofillProfile* profile) const; |
// Returns true iff every field needed to use |profile| as a shipping address |
// is populated. |
bool IsShippingComplete(const autofill::AutofillProfile* profile) const; |
+ bool IsShippingMoreComplete(const autofill::AutofillProfile* p1, |
+ const autofill::AutofillProfile* p2) const; |
+ |
+ // Returns a localized string to be displayed in UI indicating what action, |
+ // if any, must be taken for the given profile to be used as contact info. |
+ base::string16 GetStringForMissingContactFields( |
+ const autofill::AutofillProfile& profile) const; |
+ |
// Returns a localized string to be displayed in UI indicating what action, |
// if any, must be taken for the given profile to be used as a shipping |
// address. |