Chromium Code Reviews| 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..919865142548ea4295af5a5f342a673c467ee9ad 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,10 @@ 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 at the back. |
|
Mathieu
2016/05/20 13:57:09
nit: back -> end of the list?
sebsg
2016/05/24 17:27:32
Done.
|
| + 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 +242,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 +402,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_; |