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

Side by Side Diff: components/autofill/core/browser/personal_data_manager.h

Issue 1867523003: [Autofill] Suggest expired credit cards last. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/autofill/core/browser/personal_data_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool ImportCreditCard(const FormStructure& form, 383 bool ImportCreditCard(const FormStructure& form,
384 bool should_return_local_card, 384 bool should_return_local_card,
385 std::unique_ptr<CreditCard>* imported_credit_card); 385 std::unique_ptr<CreditCard>* imported_credit_card);
386 386
387 // Functionally equivalent to GetProfiles(), but also records metrics if 387 // Functionally equivalent to GetProfiles(), but also records metrics if
388 // |record_metrics| is true. Metrics should be recorded when the returned 388 // |record_metrics| is true. Metrics should be recorded when the returned
389 // profiles will be used to populate the fields shown in an Autofill popup. 389 // profiles will be used to populate the fields shown in an Autofill popup.
390 const std::vector<AutofillProfile*>& GetProfiles( 390 const std::vector<AutofillProfile*>& GetProfiles(
391 bool record_metrics) const; 391 bool record_metrics) const;
392 392
393 // Fills |cards_to_suggest| with valid credit cards to suggest based on the 393 // Returns credit card suggestions based on the |cards_to_suggest| and the
394 // |type| and |field_contents| of the credit card field. The cards are ordered 394 // |type| and |field_contents| of the credit card field.
395 // by frecency. 395 std::vector<Suggestion> GetSuggestionsForCards(
396 void GetOrderedCardsToSuggest(
397 const AutofillType& type, 396 const AutofillType& type,
398 const base::string16& field_contents, 397 const base::string16& field_contents,
399 std::list<const CreditCard*>* cards_to_suggest) const; 398 const std::list<const CreditCard*>& cards_to_suggest) const;
400
401 // Returns the suggestions to display for the |cards_to_suggest| based on the
402 // |type| of the credit card field.
403 std::vector<Suggestion> GetSuggestionsForCards(
404 const std::list<const CreditCard*>& cards_to_suggest,
405 const AutofillType& type) const;
406 399
407 const std::string app_locale_; 400 const std::string app_locale_;
408 401
409 // The default country code for new addresses. 402 // The default country code for new addresses.
410 mutable std::string default_country_code_; 403 mutable std::string default_country_code_;
411 404
412 // The PrefService that this instance uses. Must outlive this instance. 405 // The PrefService that this instance uses. Must outlive this instance.
413 PrefService* pref_service_; 406 PrefService* pref_service_;
414 407
415 // The AccountTrackerService that this instance uses. Must outlive this 408 // The AccountTrackerService that this instance uses. Must outlive this
(...skipping 19 matching lines...) Expand all
435 428
436 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled. 429 // An observer to listen for changes to prefs::kAutofillWalletImportEnabled.
437 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_; 430 std::unique_ptr<BooleanPrefMember> wallet_enabled_pref_;
438 431
439 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); 432 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager);
440 }; 433 };
441 434
442 } // namespace autofill 435 } // namespace autofill
443 436
444 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_ 437 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PERSONAL_DATA_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698