OLD | NEW |
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/content/browser/wallet/full_wallet.h" | 5 #include "components/autofill/content/browser/wallet/full_wallet.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 default: | 126 default: |
127 return shipping_address_->GetInfo(type, app_locale); | 127 return shipping_address_->GetInfo(type, app_locale); |
128 } | 128 } |
129 } | 129 } |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 base::string16 FullWallet::TypeAndLastFourDigits() { | 133 base::string16 FullWallet::TypeAndLastFourDigits() { |
134 CreditCard card; | 134 CreditCard card; |
135 card.SetRawInfo(CREDIT_CARD_NUMBER, base::ASCIIToUTF16(GetPan())); | 135 card.SetRawInfo(CREDIT_CARD_NUMBER, base::ASCIIToUTF16(GetPan())); |
136 return card.TypeAndLastFourDigits(); | 136 return card.TypeAndLastFourDigitsForDisplay(); |
137 } | 137 } |
138 | 138 |
139 const std::string& FullWallet::GetPan() { | 139 const std::string& FullWallet::GetPan() { |
140 if (pan_.empty()) | 140 if (pan_.empty()) |
141 DecryptCardInfo(); | 141 DecryptCardInfo(); |
142 return pan_; | 142 return pan_; |
143 } | 143 } |
144 | 144 |
145 bool FullWallet::operator==(const FullWallet& other) const { | 145 bool FullWallet::operator==(const FullWallet& other) const { |
146 if (expiration_month_ != other.expiration_month_) | 146 if (expiration_month_ != other.expiration_month_) |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 } | 226 } |
227 | 227 |
228 const std::string& FullWallet::GetCvn() { | 228 const std::string& FullWallet::GetCvn() { |
229 if (cvn_.empty()) | 229 if (cvn_.empty()) |
230 DecryptCardInfo(); | 230 DecryptCardInfo(); |
231 return cvn_; | 231 return cvn_; |
232 } | 232 } |
233 | 233 |
234 } // namespace wallet | 234 } // namespace wallet |
235 } // namespace autofill | 235 } // namespace autofill |
OLD | NEW |