| 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 void set_generation_type( | 86 void set_generation_type( |
| 87 AutofillUploadContents::Field::PasswordGenerationType type) { | 87 AutofillUploadContents::Field::PasswordGenerationType type) { |
| 88 generation_type_ = type; | 88 generation_type_ = type; |
| 89 } | 89 } |
| 90 AutofillUploadContents::Field::PasswordGenerationType generation_type() | 90 AutofillUploadContents::Field::PasswordGenerationType generation_type() |
| 91 const { | 91 const { |
| 92 return generation_type_; | 92 return generation_type_; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void set_form_classifier_outcome( |
| 96 AutofillUploadContents::Field::FormClassifierOutcome outcome) { |
| 97 form_classifier_outcome_ = outcome; |
| 98 } |
| 99 AutofillUploadContents::Field::FormClassifierOutcome form_classifier_outcome() |
| 100 const { |
| 101 return form_classifier_outcome_; |
| 102 } |
| 103 |
| 95 // Set |field_data|'s value to |value|. Uses |field|, |address_language_code|, | 104 // Set |field_data|'s value to |value|. Uses |field|, |address_language_code|, |
| 96 // and |app_locale| as hints when filling exceptional cases like phone number | 105 // and |app_locale| as hints when filling exceptional cases like phone number |
| 97 // values and <select> fields. Returns |true| if the field has been filled, | 106 // values and <select> fields. Returns |true| if the field has been filled, |
| 98 // |false| otherwise. | 107 // |false| otherwise. |
| 99 static bool FillFormField(const AutofillField& field, | 108 static bool FillFormField(const AutofillField& field, |
| 100 const base::string16& value, | 109 const base::string16& value, |
| 101 const std::string& address_language_code, | 110 const std::string& address_language_code, |
| 102 const std::string& app_locale, | 111 const std::string& app_locale, |
| 103 FormFieldData* field_data); | 112 FormFieldData* field_data); |
| 104 | 113 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 bool previously_autofilled_; | 165 bool previously_autofilled_; |
| 157 | 166 |
| 158 // The parseable name attribute, with unnecessary information removed (such as | 167 // The parseable name attribute, with unnecessary information removed (such as |
| 159 // a common prefix shared with other fields). Will be used for heuristics | 168 // a common prefix shared with other fields). Will be used for heuristics |
| 160 // parsing. | 169 // parsing. |
| 161 base::string16 parseable_name_; | 170 base::string16 parseable_name_; |
| 162 | 171 |
| 163 // The type of password generation event, if it happened. | 172 // The type of password generation event, if it happened. |
| 164 AutofillUploadContents::Field::PasswordGenerationType generation_type_; | 173 AutofillUploadContents::Field::PasswordGenerationType generation_type_; |
| 165 | 174 |
| 175 // The outcome of HTML parsing based form classifier. |
| 176 AutofillUploadContents::Field::FormClassifierOutcome form_classifier_outcome_; |
| 177 |
| 166 DISALLOW_COPY_AND_ASSIGN(AutofillField); | 178 DISALLOW_COPY_AND_ASSIGN(AutofillField); |
| 167 }; | 179 }; |
| 168 | 180 |
| 169 } // namespace autofill | 181 } // namespace autofill |
| 170 | 182 |
| 171 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ | 183 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ |
| OLD | NEW |