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/instrument.h" | 5 #include "components/autofill/content/browser/wallet/instrument.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/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 dict->SetString("credit_card.fop_type", | 108 dict->SetString("credit_card.fop_type", |
109 FormOfPaymentToString(form_of_payment_)); | 109 FormOfPaymentToString(form_of_payment_)); |
110 dict->SetString("credit_card.last_4_digits", last_four_digits_); | 110 dict->SetString("credit_card.last_4_digits", last_four_digits_); |
111 dict->Set("credit_card.address", | 111 dict->Set("credit_card.address", |
112 address_.get()->ToDictionaryWithoutID().release()); | 112 address_.get()->ToDictionaryWithoutID().release()); |
113 | 113 |
114 return dict.Pass(); | 114 return dict.Pass(); |
115 } | 115 } |
116 | 116 |
117 void Instrument::Init() { | 117 void Instrument::Init() { |
118 expiration_differs_from_server_ = false; | |
Evan Stade
2013/12/07 02:36:12
you have to put this in all the constructors unfor
Dan Beam
2013/12/10 22:04:31
Done.
| |
118 if (primary_account_number_.size() >= 4) { | 119 if (primary_account_number_.size() >= 4) { |
119 last_four_digits_ = | 120 last_four_digits_ = |
120 primary_account_number_.substr(primary_account_number_.size() - 4); | 121 primary_account_number_.substr(primary_account_number_.size() - 4); |
121 } | 122 } |
122 } | 123 } |
123 | 124 |
124 } // namespace wallet | 125 } // namespace wallet |
125 } // namespace autofill | 126 } // namespace autofill |
OLD | NEW |