| 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/core/browser/credit_card_field.h" | 5 #include "components/autofill/core/browser/credit_card_field.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | |
| 10 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 12 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 14 #include "components/autofill/core/browser/autofill_field.h" | 13 #include "components/autofill/core/browser/autofill_field.h" |
| 15 #include "components/autofill/core/browser/autofill_regex_constants.h" | 14 #include "components/autofill/core/browser/autofill_regex_constants.h" |
| 16 #include "components/autofill/core/browser/autofill_scanner.h" | 15 #include "components/autofill/core/browser/autofill_scanner.h" |
| 17 #include "components/autofill/core/browser/field_types.h" | 16 #include "components/autofill/core/browser/field_types.h" |
| 18 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 19 | 18 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 266 |
| 268 ServerFieldType CreditCardField::GetExpirationYearType() const { | 267 ServerFieldType CreditCardField::GetExpirationYearType() const { |
| 269 return (expiration_date_ | 268 return (expiration_date_ |
| 270 ? exp_year_type_ | 269 ? exp_year_type_ |
| 271 : ((expiration_year_ && expiration_year_->max_length == 2) | 270 : ((expiration_year_ && expiration_year_->max_length == 2) |
| 272 ? CREDIT_CARD_EXP_2_DIGIT_YEAR | 271 ? CREDIT_CARD_EXP_2_DIGIT_YEAR |
| 273 : CREDIT_CARD_EXP_4_DIGIT_YEAR)); | 272 : CREDIT_CARD_EXP_4_DIGIT_YEAR)); |
| 274 } | 273 } |
| 275 | 274 |
| 276 } // namespace autofill | 275 } // namespace autofill |
| OLD | NEW |