Index: components/autofill/core/browser/personal_data_manager.h |
diff --git a/components/autofill/core/browser/personal_data_manager.h b/components/autofill/core/browser/personal_data_manager.h |
index 3513d9e21f2d6fa9a335644a9bd78417fcc5a656..170db27aef8366ce1d67b348163b49e443c7b210 100644 |
--- a/components/autofill/core/browser/personal_data_manager.h |
+++ b/components/autofill/core/browser/personal_data_manager.h |
@@ -177,6 +177,9 @@ class PersonalDataManager : public KeyedService, |
// Returns true if there is some data synced from Wallet. |
bool HasServerData() const; |
+ // Returns the profiles to suggest to the user, ordered by frecency. |
+ const std::vector<AutofillProfile*> GetProfilesToSuggest() const; |
+ |
// Loads profiles that can suggest data for |type|. |field_contents| is the |
// part the user has already typed. |field_is_autofilled| is true if the field |
// has already been autofilled. |other_field_types| represents the rest of |
@@ -187,6 +190,11 @@ class PersonalDataManager : public KeyedService, |
bool field_is_autofilled, |
const std::vector<ServerFieldType>& other_field_types); |
+ // Returns the credit cards to suggest to the users. Those have been deduped |
+ // and ordered by frecency with the expired cards put at the end of the |
+ // vector. |
+ const std::vector<CreditCard*> GetCreditCardsToSuggest() const; |
+ |
// Gets credit cards that can suggest data for |type|. See |
// GetProfileSuggestions for argument descriptions. The variant in each |
// GUID pair should be ignored. |
@@ -235,7 +243,7 @@ class PersonalDataManager : public KeyedService, |
// local duplicates, and local cards are preferred over their masked server |
// card duplicate. |
static void DedupeCreditCardToSuggest( |
- std::list<const CreditCard*>* cards_to_suggest); |
+ std::list<CreditCard*>* cards_to_suggest); |
protected: |
// Only PersonalDataManagerFactory and certain tests can create instances of |
@@ -395,7 +403,7 @@ class PersonalDataManager : public KeyedService, |
std::vector<Suggestion> GetSuggestionsForCards( |
const AutofillType& type, |
const base::string16& field_contents, |
- const std::list<const CreditCard*>& cards_to_suggest) const; |
+ const std::vector<CreditCard*>& cards_to_suggest) const; |
const std::string app_locale_; |