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 "chrome/browser/autofill/wallet/full_wallet.h" | 5 #include "components/autofill/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/values.h" | 9 #include "base/values.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 const size_t kPanSize = 16; | 13 const size_t kPanSize = 16; |
14 const size_t kBinSize = 6; | 14 const size_t kBinSize = 6; |
15 const size_t kCvnSize = 3; | 15 const size_t kCvnSize = 3; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 card_info.insert(card_info.begin(), padded_length - card_info.size(), '0'); | 215 card_info.insert(card_info.begin(), padded_length - card_info.size(), '0'); |
216 | 216 |
217 // Separate out the PAN from the CVN. | 217 // Separate out the PAN from the CVN. |
218 size_t split = kPanSize - kBinSize; | 218 size_t split = kPanSize - kBinSize; |
219 cvn_ = card_info.substr(split); | 219 cvn_ = card_info.substr(split); |
220 pan_ = iin_ + card_info.substr(0, split); | 220 pan_ = iin_ + card_info.substr(0, split); |
221 } | 221 } |
222 | 222 |
223 } // namespace wallet | 223 } // namespace wallet |
224 } // namespace autofill | 224 } // namespace autofill |
OLD | NEW |