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 a62fb6049f68ca5584b30422fde324924ce79490..7ea9a0c9971f2a7193120091a664538face15c30 100644 |
| --- a/components/autofill/core/browser/personal_data_manager.h |
| +++ b/components/autofill/core/browser/personal_data_manager.h |
| @@ -180,6 +180,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 |
| @@ -190,6 +193,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 |
|
gone
2016/05/31 22:39:42
nit: Be consistent about the sentence target. You
sebsg
2016/06/01 20:58:25
Done.
|
| + // 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. |
| @@ -238,7 +246,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 |
| @@ -398,7 +406,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_; |