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

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: Adds clarification for SkColor 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 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 ? Suggestion::PREFIX_MATCH 1614 ? Suggestion::PREFIX_MATCH
1615 : Suggestion::SUBSTRING_MATCH; 1615 : Suggestion::SUBSTRING_MATCH;
1616 1616
1617 // If the value is the card number, the label is the expiration date. 1617 // If the value is the card number, the label is the expiration date.
1618 // Otherwise the label is the card number, or if that is empty the 1618 // Otherwise the label is the card number, or if that is empty the
1619 // cardholder name. The label should never repeat the value. 1619 // cardholder name. The label should never repeat the value.
1620 if (type.GetStorableType() == CREDIT_CARD_NUMBER) { 1620 if (type.GetStorableType() == CREDIT_CARD_NUMBER) {
1621 suggestion->value = credit_card->TypeAndLastFourDigits(); 1621 suggestion->value = credit_card->TypeAndLastFourDigits();
1622 suggestion->label = credit_card->GetInfo( 1622 suggestion->label = credit_card->GetInfo(
1623 AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_); 1623 AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR), app_locale_);
1624 ModifyAutofillCreditCardSuggestion(suggestion);
1624 } else if (credit_card->number().empty()) { 1625 } else if (credit_card->number().empty()) {
1625 if (type.GetStorableType() != CREDIT_CARD_NAME_FULL) { 1626 if (type.GetStorableType() != CREDIT_CARD_NAME_FULL) {
1626 suggestion->label = credit_card->GetInfo( 1627 suggestion->label = credit_card->GetInfo(
1627 AutofillType(CREDIT_CARD_NAME_FULL), app_locale_); 1628 AutofillType(CREDIT_CARD_NAME_FULL), app_locale_);
1628 } 1629 }
1629 } else { 1630 } else {
1630 #if defined(OS_ANDROID) 1631 #if defined(OS_ANDROID)
1631 // Since Android places the label on its own row, there's more 1632 // Since Android places the label on its own row, there's more
1632 // horizontal 1633 // horizontal
1633 // space to work with. Show "Amex - 1234" rather than desktop's "*1234". 1634 // space to work with. Show "Amex - 1234" rather than desktop's "*1234".
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 if (profile_to_merge->IsVerified()) 1792 if (profile_to_merge->IsVerified())
1792 break; 1793 break;
1793 } 1794 }
1794 } 1795 }
1795 } 1796 }
1796 AutofillMetrics::LogNumberOfProfilesRemovedDuringDedupe( 1797 AutofillMetrics::LogNumberOfProfilesRemovedDuringDedupe(
1797 profiles_to_delete->size()); 1798 profiles_to_delete->size());
1798 } 1799 }
1799 1800
1800 } // namespace autofill 1801 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698