| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void set_section(const std::string& section) { section_ = section; } | 46 void set_section(const std::string& section) { section_ = section; } |
| 47 void set_heuristic_type(ServerFieldType type); | 47 void set_heuristic_type(ServerFieldType type); |
| 48 void set_server_type(ServerFieldType type); | 48 void set_server_type(ServerFieldType type); |
| 49 void set_possible_types(const ServerFieldTypeSet& possible_types) { | 49 void set_possible_types(const ServerFieldTypeSet& possible_types) { |
| 50 possible_types_ = possible_types; | 50 possible_types_ = possible_types; |
| 51 } | 51 } |
| 52 void SetHtmlType(HtmlFieldType type, HtmlFieldMode mode); | 52 void SetHtmlType(HtmlFieldType type, HtmlFieldMode mode); |
| 53 void set_previously_autofilled(bool previously_autofilled) { | 53 void set_previously_autofilled(bool previously_autofilled) { |
| 54 previously_autofilled_ = previously_autofilled; | 54 previously_autofilled_ = previously_autofilled; |
| 55 } | 55 } |
| 56 void set_parseable_name(base::string16 parseable_name) { | 56 void set_parseable_name(const base::string16& parseable_name) { |
| 57 parseable_name_ = std::move(parseable_name); | 57 parseable_name_ = parseable_name; |
| 58 } | 58 } |
| 59 | 59 |
| 60 // This function automatically chooses between server and heuristic autofill | 60 // This function automatically chooses between server and heuristic autofill |
| 61 // type, depending on the data available. | 61 // type, depending on the data available. |
| 62 AutofillType Type() const; | 62 AutofillType Type() const; |
| 63 | 63 |
| 64 // Returns true if the value of this field is empty. | 64 // Returns true if the value of this field is empty. |
| 65 bool IsEmpty() const; | 65 bool IsEmpty() const; |
| 66 | 66 |
| 67 // The unique signature of this field, composed of the field name and the html | 67 // The unique signature of this field, composed of the field name and the html |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // a common prefix shared with other fields). Will be used for heuristics | 147 // a common prefix shared with other fields). Will be used for heuristics |
| 148 // parsing. | 148 // parsing. |
| 149 base::string16 parseable_name_; | 149 base::string16 parseable_name_; |
| 150 | 150 |
| 151 DISALLOW_COPY_AND_ASSIGN(AutofillField); | 151 DISALLOW_COPY_AND_ASSIGN(AutofillField); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace autofill | 154 } // namespace autofill |
| 155 | 155 |
| 156 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ | 156 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_FIELD_H_ |
| OLD | NEW |