diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-26 20:25:47 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-26 20:25:47 +0000 |
commit | 742a95edabae36e0435dc1755d2ea2decb6cf7b0 (patch) | |
tree | d64fa25805533bf1900148c26e9bb2cd230f0c5d /chrome/browser/autofill/autofill_manager.cc | |
parent | a22347228d3f73a28313e04750f49217e4d50446 (diff) | |
download | chromium_src-742a95edabae36e0435dc1755d2ea2decb6cf7b0.zip chromium_src-742a95edabae36e0435dc1755d2ea2decb6cf7b0.tar.gz chromium_src-742a95edabae36e0435dc1755d2ea2decb6cf7b0.tar.bz2 |
AutoFill displayed CC# should include an asterisk e.g. Profile;*1234
Changes separator used in AutoFill label containing credit card info to prefix the card number with an asterisk.
BUG=50075
TEST=AutoFillManagerTest.GetCreditCardSuggestions*
Review URL: http://codereview.chromium.org/3029030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_manager.cc')
-rw-r--r-- | chrome/browser/autofill/autofill_manager.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc index b5b28fe..d58a10d 100644 --- a/chrome/browser/autofill/autofill_manager.cc +++ b/chrome/browser/autofill/autofill_manager.cc @@ -38,7 +38,7 @@ const int kAutoFillPhoneNumberPrefixCount = 3; const int kAutoFillPhoneNumberSuffixOffset = 3; const int kAutoFillPhoneNumberSuffixCount = 4; -const string16::value_type kLabelSeparator[] = {';',' ',0}; +const string16::value_type kLabelSeparator[] = {';',' ', '*', 0}; // Removes duplicate elements whilst preserving original order of |elements| and // |unique_ids|. @@ -504,8 +504,7 @@ void AutoFillManager::GetProfileSuggestions(FormStructure* form, personal_data_->credit_cards().begin(); cc != personal_data_->credit_cards().end(); ++cc) { expanded_values.push_back((*values)[i]); - string16 label = (*labels)[i] + kLabelSeparator + - (*cc)->LastFourDigits(); + string16 label = (*labels)[i] + kLabelSeparator + (*cc)->LastFourDigits(); expanded_labels.push_back(label); unique_ids->push_back(profile->unique_id()); } @@ -565,8 +564,7 @@ void AutoFillManager::GetBillingProfileSuggestions( iter != personal_data_->profiles().end(); ++iter) { values->push_back(billing_profile->GetFieldText(type)); - string16 label = (*iter)->Label() + - ASCIIToUTF16("; ") + + string16 label = (*iter)->Label() + kLabelSeparator + (*cc)->LastFourDigits(); labels->push_back(label); unique_ids->push_back((*iter)->unique_id()); @@ -607,8 +605,7 @@ void AutoFillManager::GetCreditCardSuggestions(FormStructure* form, iter != personal_data_->profiles().end(); ++iter) { values->push_back(creditcard_field_value); - string16 label = (*iter)->Label() + - ASCIIToUTF16("; ") + + string16 label = (*iter)->Label() + kLabelSeparator + credit_card->LastFourDigits(); labels->push_back(label); unique_ids->push_back((*iter)->unique_id()); |