| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 const string16& section() const { return section_; } | 31 const string16& section() const { return section_; } |
| 32 AutofillFieldType heuristic_type() const { return heuristic_type_; } | 32 AutofillFieldType heuristic_type() const { return heuristic_type_; } |
| 33 AutofillFieldType server_type() const { return server_type_; } | 33 AutofillFieldType server_type() const { return server_type_; } |
| 34 const FieldTypeSet& possible_types() const { return possible_types_; } | 34 const FieldTypeSet& possible_types() const { return possible_types_; } |
| 35 PhonePart phone_part() const { return phone_part_; } | 35 PhonePart phone_part() const { return phone_part_; } |
| 36 | 36 |
| 37 // Sets the heuristic type of this field, validating the input. | 37 // Sets the heuristic type of this field, validating the input. |
| 38 void set_section(const string16& section) { section_ = section; } | 38 void set_section(const string16& section) { section_ = section; } |
| 39 void set_heuristic_type(AutofillFieldType type); | 39 void set_heuristic_type(AutofillFieldType type); |
| 40 void set_server_type(AutofillFieldType type) { server_type_ = type; } | 40 void set_server_type(AutofillFieldType type); |
| 41 void set_possible_types(const FieldTypeSet& possible_types) { | 41 void set_possible_types(const FieldTypeSet& possible_types) { |
| 42 possible_types_ = possible_types; | 42 possible_types_ = possible_types; |
| 43 } | 43 } |
| 44 void set_phone_part(PhonePart part) { phone_part_ = part; } | 44 void set_phone_part(PhonePart part) { phone_part_ = part; } |
| 45 | 45 |
| 46 // This function automatically chooses between server and heuristic autofill | 46 // This function automatically chooses between server and heuristic autofill |
| 47 // type, depending on the data available. | 47 // type, depending on the data available. |
| 48 AutofillFieldType type() const; | 48 AutofillFieldType type() const; |
| 49 | 49 |
| 50 // Returns true if the value of this field is empty. | 50 // Returns true if the value of this field is empty. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 75 // The set of possible types for this field. | 75 // The set of possible types for this field. |
| 76 FieldTypeSet possible_types_; | 76 FieldTypeSet possible_types_; |
| 77 | 77 |
| 78 // Used to track whether this field is a phone prefix or suffix. | 78 // Used to track whether this field is a phone prefix or suffix. |
| 79 PhonePart phone_part_; | 79 PhonePart phone_part_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(AutofillField); | 81 DISALLOW_COPY_AND_ASSIGN(AutofillField); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ | 84 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ |
| OLD | NEW |