| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/credit_card_field.h" | 5 #include "components/autofill/browser/credit_card_field.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "chrome/browser/autofill/autofill_field.h" | 14 #include "components/autofill/browser/autofill_field.h" |
| 15 #include "chrome/browser/autofill/autofill_regex_constants.h" | 15 #include "components/autofill/browser/autofill_regex_constants.h" |
| 16 #include "chrome/browser/autofill/autofill_scanner.h" | 16 #include "components/autofill/browser/autofill_scanner.h" |
| 17 #include "chrome/browser/autofill/field_types.h" | 17 #include "components/autofill/browser/field_types.h" |
| 18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
| 19 | 19 |
| 20 // static | 20 // static |
| 21 FormField* CreditCardField::Parse(AutofillScanner* scanner) { | 21 FormField* CreditCardField::Parse(AutofillScanner* scanner) { |
| 22 if (scanner->IsEnd()) | 22 if (scanner->IsEnd()) |
| 23 return NULL; | 23 return NULL; |
| 24 | 24 |
| 25 scoped_ptr<CreditCardField> credit_card_field(new CreditCardField); | 25 scoped_ptr<CreditCardField> credit_card_field(new CreditCardField); |
| 26 size_t saved_cursor = scanner->SaveCursor(); | 26 size_t saved_cursor = scanner->SaveCursor(); |
| 27 | 27 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 map); | 220 map); |
| 221 } else { | 221 } else { |
| 222 ok = ok && AddClassification(expiration_year_, | 222 ok = ok && AddClassification(expiration_year_, |
| 223 CREDIT_CARD_EXP_4_DIGIT_YEAR, | 223 CREDIT_CARD_EXP_4_DIGIT_YEAR, |
| 224 map); | 224 map); |
| 225 } | 225 } |
| 226 } | 226 } |
| 227 | 227 |
| 228 return ok; | 228 return ok; |
| 229 } | 229 } |
| OLD | NEW |