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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 wallet->cvn_ = cvn; | 65 wallet->cvn_ = cvn; |
66 return wallet; | 66 return wallet; |
67 } | 67 } |
68 | 68 |
69 base::string16 FullWallet::GetInfo(const std::string& app_locale, | 69 base::string16 FullWallet::GetInfo(const std::string& app_locale, |
70 const AutofillType& type) { | 70 const AutofillType& type) { |
71 switch (type.GetStorableType()) { | 71 switch (type.GetStorableType()) { |
72 case CREDIT_CARD_NUMBER: | 72 case CREDIT_CARD_NUMBER: |
73 return base::ASCIIToUTF16(GetPan()); | 73 return base::ASCIIToUTF16(GetPan()); |
74 | 74 |
75 case CREDIT_CARD_NAME: | 75 case CREDIT_CARD_NAME_FULL: |
76 return billing_address()->recipient_name(); | 76 return billing_address()->recipient_name(); |
77 | 77 |
78 case CREDIT_CARD_VERIFICATION_CODE: | 78 case CREDIT_CARD_VERIFICATION_CODE: |
79 return base::ASCIIToUTF16(GetCvn()); | 79 return base::ASCIIToUTF16(GetCvn()); |
80 | 80 |
81 case CREDIT_CARD_EXP_MONTH: | 81 case CREDIT_CARD_EXP_MONTH: |
82 if (expiration_month() == 0) | 82 if (expiration_month() == 0) |
83 return base::string16(); | 83 return base::string16(); |
84 return base::IntToString16(expiration_month()); | 84 return base::IntToString16(expiration_month()); |
85 | 85 |
(...skipping 140 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 |