Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: components/autofill/core/browser/autofill_field.cc

Issue 2041863003: [Autofill] Fix the trucating of expiration year inputs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_field_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_field_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698