| 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/form_field.h" | 5 #include "components/autofill/core/browser/form_field.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 if (!MatchesFormControlType(field->form_control_type, match_type)) | 84 if (!MatchesFormControlType(field->form_control_type, match_type)) |
| 85 return false; | 85 return false; |
| 86 | 86 |
| 87 return MatchAndAdvance(scanner, pattern, match_type, match); | 87 return MatchAndAdvance(scanner, pattern, match_type, match); |
| 88 } | 88 } |
| 89 | 89 |
| 90 // static | 90 // static |
| 91 bool FormField::ParseEmptyLabel(AutofillScanner* scanner, | 91 bool FormField::ParseEmptyLabel(AutofillScanner* scanner, |
| 92 const AutofillField** match) { | 92 const AutofillField** match) { |
| 93 return ParseFieldSpecifics(scanner, | 93 return ParseFieldSpecifics(scanner, |
| 94 ASCIIToUTF16("^$"), | 94 base::ASCIIToUTF16("^$"), |
| 95 MATCH_LABEL | MATCH_ALL_INPUTS, | 95 MATCH_LABEL | MATCH_ALL_INPUTS, |
| 96 match); | 96 match); |
| 97 } | 97 } |
| 98 | 98 |
| 99 // static | 99 // static |
| 100 bool FormField::AddClassification(const AutofillField* field, | 100 bool FormField::AddClassification(const AutofillField* field, |
| 101 ServerFieldType type, | 101 ServerFieldType type, |
| 102 ServerFieldTypeMap* map) { | 102 ServerFieldTypeMap* map) { |
| 103 // Several fields are optional. | 103 // Several fields are optional. |
| 104 if (!field) | 104 if (!field) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 if ((match_type & MATCH_SELECT) && type == "select-one") | 183 if ((match_type & MATCH_SELECT) && type == "select-one") |
| 184 return true; | 184 return true; |
| 185 | 185 |
| 186 if ((match_type & MATCH_TEXT_AREA) && type == "textarea") | 186 if ((match_type & MATCH_TEXT_AREA) && type == "textarea") |
| 187 return true; | 187 return true; |
| 188 | 188 |
| 189 return false; | 189 return false; |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace autofill | 192 } // namespace autofill |
| OLD | NEW |