| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/wallet/wallet_items.h" | 5 #include "components/autofill/browser/wallet/wallet_items.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 AutofillFieldType type, | 317 AutofillFieldType type, |
| 318 const std::string& app_locale) const { | 318 const std::string& app_locale) const { |
| 319 if (AutofillType(type).group() != AutofillType::CREDIT_CARD) | 319 if (AutofillType(type).group() != AutofillType::CREDIT_CARD) |
| 320 return address().GetInfo(type, app_locale); | 320 return address().GetInfo(type, app_locale); |
| 321 | 321 |
| 322 switch (type) { | 322 switch (type) { |
| 323 case CREDIT_CARD_NAME: | 323 case CREDIT_CARD_NAME: |
| 324 return address().recipient_name(); | 324 return address().recipient_name(); |
| 325 | 325 |
| 326 case CREDIT_CARD_NUMBER: | 326 case CREDIT_CARD_NUMBER: |
| 327 // TODO(dbeam): show these as XXXX-#### and non-editable in the UI. | 327 return DisplayName(); |
| 328 return last_four_digits(); | |
| 329 | 328 |
| 330 case CREDIT_CARD_EXP_4_DIGIT_YEAR: | 329 case CREDIT_CARD_EXP_4_DIGIT_YEAR: |
| 331 return base::IntToString16(expiration_year()); | 330 return base::IntToString16(expiration_year()); |
| 332 | 331 |
| 333 case CREDIT_CARD_VERIFICATION_CODE: | 332 case CREDIT_CARD_VERIFICATION_CODE: |
| 334 break; | 333 break; |
| 335 | 334 |
| 336 default: | 335 default: |
| 337 NOTREACHED(); | 336 NOTREACHED(); |
| 338 } | 337 } |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 VectorsAreEqual<LegalDocument>(legal_documents(), | 521 VectorsAreEqual<LegalDocument>(legal_documents(), |
| 523 other.legal_documents()); | 522 other.legal_documents()); |
| 524 } | 523 } |
| 525 | 524 |
| 526 bool WalletItems::operator!=(const WalletItems& other) const { | 525 bool WalletItems::operator!=(const WalletItems& other) const { |
| 527 return !(*this == other); | 526 return !(*this == other); |
| 528 } | 527 } |
| 529 | 528 |
| 530 } // namespace wallet | 529 } // namespace wallet |
| 531 } // namespace autofill | 530 } // namespace autofill |
| OLD | NEW |