| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 bool IsEmpty() const; | 49 bool IsEmpty() const; |
| 50 | 50 |
| 51 // The unique signature of this field, composed of the field name and the html | 51 // The unique signature of this field, composed of the field name and the html |
| 52 // input type in a 32-bit hash. | 52 // input type in a 32-bit hash. |
| 53 std::string FieldSignature() const; | 53 std::string FieldSignature() const; |
| 54 | 54 |
| 55 // Returns true if the field type has been determined (without the text in the | 55 // Returns true if the field type has been determined (without the text in the |
| 56 // field). | 56 // field). |
| 57 bool IsFieldFillable() const; | 57 bool IsFieldFillable() const; |
| 58 | 58 |
| 59 void set_default_value(const std::string& value) { default_value_ = value; } |
| 60 const std::string& default_value() const { return default_value_; } |
| 61 |
| 59 private: | 62 private: |
| 60 // The unique name of this field, generated by Autofill. | 63 // The unique name of this field, generated by Autofill. |
| 61 string16 unique_name_; | 64 string16 unique_name_; |
| 62 | 65 |
| 63 // The unique identifier for the section (e.g. billing vs. shipping address) | 66 // The unique identifier for the section (e.g. billing vs. shipping address) |
| 64 // that this field belongs to. | 67 // that this field belongs to. |
| 65 std::string section_; | 68 std::string section_; |
| 66 | 69 |
| 67 // The type of the field, as determined by the Autofill server. | 70 // The type of the field, as determined by the Autofill server. |
| 68 AutofillFieldType server_type_; | 71 AutofillFieldType server_type_; |
| 69 | 72 |
| 70 // The type of the field, as determined by the local heuristics. | 73 // The type of the field, as determined by the local heuristics. |
| 71 AutofillFieldType heuristic_type_; | 74 AutofillFieldType heuristic_type_; |
| 72 | 75 |
| 73 // The set of possible types for this field. | 76 // The set of possible types for this field. |
| 74 FieldTypeSet possible_types_; | 77 FieldTypeSet possible_types_; |
| 75 | 78 |
| 76 // Used to track whether this field is a phone prefix or suffix. | 79 // Used to track whether this field is a phone prefix or suffix. |
| 77 PhonePart phone_part_; | 80 PhonePart phone_part_; |
| 78 | 81 |
| 82 // The default value returned by the Autofill server. |
| 83 std::string default_value_; |
| 84 |
| 79 DISALLOW_COPY_AND_ASSIGN(AutofillField); | 85 DISALLOW_COPY_AND_ASSIGN(AutofillField); |
| 80 }; | 86 }; |
| 81 | 87 |
| 82 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ | 88 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ |
| OLD | NEW |