| 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/autofill_field.h" | 5 #include "components/autofill/core/browser/autofill_field.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/i18n/case_conversion.h" | 10 #include "base/i18n/case_conversion.h" |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 } else if (field_data->form_control_type == "month") { | 609 } else if (field_data->form_control_type == "month") { |
| 610 return FillMonthControl(value, field_data); | 610 return FillMonthControl(value, field_data); |
| 611 } else if (type.GetStorableType() == ADDRESS_HOME_STREET_ADDRESS) { | 611 } else if (type.GetStorableType() == ADDRESS_HOME_STREET_ADDRESS) { |
| 612 FillStreetAddress(value, address_language_code, field_data); | 612 FillStreetAddress(value, address_language_code, field_data); |
| 613 return true; | 613 return true; |
| 614 } else if (type.GetStorableType() == CREDIT_CARD_NUMBER) { | 614 } else if (type.GetStorableType() == CREDIT_CARD_NUMBER) { |
| 615 FillCreditCardNumberField(field, value, field_data); | 615 FillCreditCardNumberField(field, value, field_data); |
| 616 return true; | 616 return true; |
| 617 } else if (type.GetStorableType() == ADDRESS_HOME_STATE) { | 617 } else if (type.GetStorableType() == ADDRESS_HOME_STATE) { |
| 618 return FillStateText(value, field_data); | 618 return FillStateText(value, field_data); |
| 619 } else if (field_data->form_control_type == "input" && | 619 } else if (field_data->form_control_type == "text" && |
| 620 (type.GetStorableType() == CREDIT_CARD_EXP_2_DIGIT_YEAR || | 620 (type.GetStorableType() == CREDIT_CARD_EXP_2_DIGIT_YEAR || |
| 621 type.GetStorableType() == CREDIT_CARD_EXP_4_DIGIT_YEAR)) { | 621 type.GetStorableType() == CREDIT_CARD_EXP_4_DIGIT_YEAR)) { |
| 622 FillExpirationYearInput(value, type.GetStorableType(), field_data); | 622 FillExpirationYearInput(value, type.GetStorableType(), field_data); |
| 623 return true; | 623 return true; |
| 624 } | 624 } |
| 625 | 625 |
| 626 field_data->value = value; | 626 field_data->value = value; |
| 627 return true; | 627 return true; |
| 628 } | 628 } |
| 629 | 629 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 } | 700 } |
| 701 return best_match; | 701 return best_match; |
| 702 } | 702 } |
| 703 | 703 |
| 704 bool AutofillField::IsCreditCardPrediction() const { | 704 bool AutofillField::IsCreditCardPrediction() const { |
| 705 return AutofillType(server_type_).group() == CREDIT_CARD || | 705 return AutofillType(server_type_).group() == CREDIT_CARD || |
| 706 AutofillType(heuristic_type_).group() == CREDIT_CARD; | 706 AutofillType(heuristic_type_).group() == CREDIT_CARD; |
| 707 } | 707 } |
| 708 | 708 |
| 709 } // namespace autofill | 709 } // namespace autofill |
| OLD | NEW |