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/string_number_conversions.h" | 8 #include "base/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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 case MAESTRO: | 306 case MAESTRO: |
307 case SWITCH: | 307 case SWITCH: |
308 case UNKNOWN: | 308 case UNKNOWN: |
309 idr = IDR_AUTOFILL_CC_GENERIC; | 309 idr = IDR_AUTOFILL_CC_GENERIC; |
310 break; | 310 break; |
311 } | 311 } |
312 | 312 |
313 return ResourceBundle::GetSharedInstance().GetImageNamed(idr); | 313 return ResourceBundle::GetSharedInstance().GetImageNamed(idr); |
314 } | 314 } |
315 | 315 |
316 string16 WalletItems::MaskedInstrument::GetInfo(AutofillFieldType type) const { | 316 string16 WalletItems::MaskedInstrument::GetInfo( |
| 317 AutofillFieldType type, |
| 318 const std::string& app_locale) const { |
317 if (AutofillType(type).group() != AutofillType::CREDIT_CARD) | 319 if (AutofillType(type).group() != AutofillType::CREDIT_CARD) |
318 return address().GetInfo(type); | 320 return address().GetInfo(type, app_locale); |
319 | 321 |
320 switch (type) { | 322 switch (type) { |
321 case CREDIT_CARD_NAME: | 323 case CREDIT_CARD_NAME: |
322 return address().recipient_name(); | 324 return address().recipient_name(); |
323 | 325 |
324 case CREDIT_CARD_NUMBER: | 326 case CREDIT_CARD_NUMBER: |
325 // TODO(dbeam): show these as XXXX-#### and non-editable in the UI. | 327 // TODO(dbeam): show these as XXXX-#### and non-editable in the UI. |
326 return last_four_digits(); | 328 return last_four_digits(); |
327 | 329 |
328 case CREDIT_CARD_EXP_4_DIGIT_YEAR: | 330 case CREDIT_CARD_EXP_4_DIGIT_YEAR: |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 VectorsAreEqual<LegalDocument>(legal_documents(), | 522 VectorsAreEqual<LegalDocument>(legal_documents(), |
521 other.legal_documents()); | 523 other.legal_documents()); |
522 } | 524 } |
523 | 525 |
524 bool WalletItems::operator!=(const WalletItems& other) const { | 526 bool WalletItems::operator!=(const WalletItems& other) const { |
525 return !(*this == other); | 527 return !(*this == other); |
526 } | 528 } |
527 | 529 |
528 } // namespace wallet | 530 } // namespace wallet |
529 } // namespace autofill | 531 } // namespace autofill |
OLD | NEW |