| 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 "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/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 return scoped_ptr<FullWallet>(new FullWallet(expiration_month, | 121 return scoped_ptr<FullWallet>(new FullWallet(expiration_month, |
| 122 expiration_year, | 122 expiration_year, |
| 123 iin, | 123 iin, |
| 124 encrypted_rest, | 124 encrypted_rest, |
| 125 billing_address.Pass(), | 125 billing_address.Pass(), |
| 126 shipping_address.Pass(), | 126 shipping_address.Pass(), |
| 127 required_actions)); | 127 required_actions)); |
| 128 } | 128 } |
| 129 | 129 |
| 130 base::string16 FullWallet::GetInfo(const AutofillType& type) { | 130 base::string16 FullWallet::GetInfo(const AutofillType& type) { |
| 131 switch (type.server_type()) { | 131 switch (type.GetStorableType()) { |
| 132 case CREDIT_CARD_NUMBER: | 132 case CREDIT_CARD_NUMBER: |
| 133 return UTF8ToUTF16(GetPan()); | 133 return UTF8ToUTF16(GetPan()); |
| 134 | 134 |
| 135 case CREDIT_CARD_NAME: | 135 case CREDIT_CARD_NAME: |
| 136 return billing_address()->recipient_name(); | 136 return billing_address()->recipient_name(); |
| 137 | 137 |
| 138 case CREDIT_CARD_VERIFICATION_CODE: | 138 case CREDIT_CARD_VERIFICATION_CODE: |
| 139 return UTF8ToUTF16(GetCvn()); | 139 return UTF8ToUTF16(GetCvn()); |
| 140 | 140 |
| 141 case CREDIT_CARD_EXP_MONTH: | 141 case CREDIT_CARD_EXP_MONTH: |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 287 } |
| 288 | 288 |
| 289 const std::string& FullWallet::GetCvn() { | 289 const std::string& FullWallet::GetCvn() { |
| 290 if (cvn_.empty()) | 290 if (cvn_.empty()) |
| 291 DecryptCardInfo(); | 291 DecryptCardInfo(); |
| 292 return cvn_; | 292 return cvn_; |
| 293 } | 293 } |
| 294 | 294 |
| 295 } // namespace wallet | 295 } // namespace wallet |
| 296 } // namespace autofill | 296 } // namespace autofill |
| OLD | NEW |