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/string_search.h" | 10 #include "base/i18n/string_search.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 AutofillField::AutofillField(const FormFieldData& field, | 432 AutofillField::AutofillField(const FormFieldData& field, |
433 const base::string16& unique_name) | 433 const base::string16& unique_name) |
434 : FormFieldData(field), | 434 : FormFieldData(field), |
435 unique_name_(unique_name), | 435 unique_name_(unique_name), |
436 server_type_(NO_SERVER_DATA), | 436 server_type_(NO_SERVER_DATA), |
437 heuristic_type_(UNKNOWN_TYPE), | 437 heuristic_type_(UNKNOWN_TYPE), |
438 html_type_(HTML_TYPE_UNSPECIFIED), | 438 html_type_(HTML_TYPE_UNSPECIFIED), |
439 html_mode_(HTML_MODE_NONE), | 439 html_mode_(HTML_MODE_NONE), |
440 phone_part_(IGNORED), | 440 phone_part_(IGNORED), |
441 credit_card_number_offset_(0), | 441 credit_card_number_offset_(0), |
442 previously_autofilled_(false) {} | 442 previously_autofilled_(false), |
| 443 parseable_name_(field.name) {} |
443 | 444 |
444 AutofillField::~AutofillField() {} | 445 AutofillField::~AutofillField() {} |
445 | 446 |
446 void AutofillField::set_heuristic_type(ServerFieldType type) { | 447 void AutofillField::set_heuristic_type(ServerFieldType type) { |
447 if (type >= 0 && type < MAX_VALID_FIELD_TYPE && | 448 if (type >= 0 && type < MAX_VALID_FIELD_TYPE && |
448 type != FIELD_WITH_DEFAULT_VALUE) { | 449 type != FIELD_WITH_DEFAULT_VALUE) { |
449 heuristic_type_ = type; | 450 heuristic_type_ = type; |
450 } else { | 451 } else { |
451 NOTREACHED(); | 452 NOTREACHED(); |
452 // This case should not be reachable; but since this has potential | 453 // This case should not be reachable; but since this has potential |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 if (compare.StringsEqual(value_stripped, option_contents)) { | 593 if (compare.StringsEqual(value_stripped, option_contents)) { |
593 if (index) | 594 if (index) |
594 *index = i; | 595 *index = i; |
595 return true; | 596 return true; |
596 } | 597 } |
597 } | 598 } |
598 return false; | 599 return false; |
599 } | 600 } |
600 | 601 |
601 } // namespace autofill | 602 } // namespace autofill |
OLD | NEW |