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

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

Issue 2531223003: Expanded Autofill Credit Card Popup Layout Experiment in Android. (Closed)
Patch Set: Fixes compile error. Created 4 years 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
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 #include "components/autofill/core/browser/personal_data_manager.h" 5 #include "components/autofill/core/browser/personal_data_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 ? Suggestion::PREFIX_MATCH 1618 ? Suggestion::PREFIX_MATCH
1619 : Suggestion::SUBSTRING_MATCH; 1619 : Suggestion::SUBSTRING_MATCH;
1620 1620
1621 // If the value is the card number, the label is the expiration date. 1621 // If the value is the card number, the label is the expiration date.
1622 // Otherwise the label is the card number, or if that is empty the 1622 // Otherwise the label is the card number, or if that is empty the
1623 // cardholder name. The label should never repeat the value. 1623 // cardholder name. The label should never repeat the value.
1624 if (type.GetStorableType() == CREDIT_CARD_NUMBER) { 1624 if (type.GetStorableType() == CREDIT_CARD_NUMBER) {
1625 suggestion->value = credit_card->TypeAndLastFourDigits(); 1625 suggestion->value = credit_card->TypeAndLastFourDigits();
1626 suggestion->label = credit_card->GetInfo( 1626 suggestion->label = credit_card->GetInfo(
1627 AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_); 1627 AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
1628 if (IsAutofillCreditCardPopupLayoutExperimentEnabled())
1629 ModifyAutofillCreditCardSuggestion(suggestion);
1628 } else if (credit_card->number().empty()) { 1630 } else if (credit_card->number().empty()) {
1629 if (type.GetStorableType() != CREDIT_CARD_NAME_FULL) { 1631 if (type.GetStorableType() != CREDIT_CARD_NAME_FULL) {
1630 suggestion->label = credit_card->GetInfo( 1632 suggestion->label = credit_card->GetInfo(
1631 AutofillType(CREDIT_CARD_NAME_FULL), app_locale_); 1633 AutofillType(CREDIT_CARD_NAME_FULL), app_locale_);
1632 } 1634 }
1633 } else { 1635 } else {
1634 #if defined(OS_ANDROID) 1636 #if defined(OS_ANDROID)
1635 // Since Android places the label on its own row, there's more 1637 // Since Android places the label on its own row, there's more
1636 // horizontal 1638 // horizontal
1637 // space to work with. Show "Amex - 1234" rather than desktop's "*1234". 1639 // space to work with. Show "Amex - 1234" rather than desktop's "*1234".
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 if (profile_to_merge->IsVerified()) 1797 if (profile_to_merge->IsVerified())
1796 break; 1798 break;
1797 } 1799 }
1798 } 1800 }
1799 } 1801 }
1800 AutofillMetrics::LogNumberOfProfilesRemovedDuringDedupe( 1802 AutofillMetrics::LogNumberOfProfilesRemovedDuringDedupe(
1801 profiles_to_delete->size()); 1803 profiles_to_delete->size());
1802 } 1804 }
1803 1805
1804 } // namespace autofill 1806 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_popup_delegate.h ('k') | components/autofill/core/browser/suggestion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698