| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMMON_FORM_FIELD_DATA_H_ | 5 #ifndef COMPONENTS_AUTOFILL_COMMON_FORM_FIELD_DATA_H_ |
| 6 #define COMPONENTS_AUTOFILL_COMMON_FORM_FIELD_DATA_H_ | 6 #define COMPONENTS_AUTOFILL_COMMON_FORM_FIELD_DATA_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "components/autofill/common/autofill_export.h" |
| 11 | 12 |
| 12 namespace autofill { | 13 namespace autofill { |
| 13 | 14 |
| 14 // Stores information about a field in a form. | 15 // Stores information about a field in a form. |
| 15 struct FormFieldData { | 16 struct AUTOFILL_EXPORT FormFieldData { |
| 16 FormFieldData(); | 17 FormFieldData(); |
| 17 ~FormFieldData(); | 18 ~FormFieldData(); |
| 18 | 19 |
| 19 // Equality tests for identity which does not include |value| or | 20 // Equality tests for identity which does not include |value| or |
| 20 // |is_autofilled|. | 21 // |is_autofilled|. |
| 21 // TODO(dhollowa): These operators need to be revised when we implement field | 22 // TODO(dhollowa): These operators need to be revised when we implement field |
| 22 // ids. | 23 // ids. |
| 23 bool operator==(const FormFieldData& field) const; | 24 bool operator==(const FormFieldData& field) const; |
| 24 bool operator!=(const FormFieldData& field) const; | 25 bool operator!=(const FormFieldData& field) const; |
| 25 // Comparison operator exposed for STL map. Uses label, then name to sort. | 26 // Comparison operator exposed for STL map. Uses label, then name to sort. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 EXPECT_EQ(expected.max_length, actual.max_length); \ | 59 EXPECT_EQ(expected.max_length, actual.max_length); \ |
| 59 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \ | 60 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \ |
| 60 EXPECT_EQ(expected.is_checked, actual.is_checked); \ | 61 EXPECT_EQ(expected.is_checked, actual.is_checked); \ |
| 61 EXPECT_EQ(expected.is_checkable, actual.is_checkable); \ | 62 EXPECT_EQ(expected.is_checkable, actual.is_checkable); \ |
| 62 } while (0) | 63 } while (0) |
| 63 | 64 |
| 64 } // namespace autofill | 65 } // namespace autofill |
| 65 | 66 |
| 66 #endif // COMPONENTS_AUTOFILL_COMMON_FORM_FIELD_DATA_H_ | 67 #endif // COMPONENTS_AUTOFILL_COMMON_FORM_FIELD_DATA_H_ |
| 67 | 68 |
| OLD | NEW |