Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: components/autofill/core/common/form_field_data.h

Issue 2640783002: [Password Generation] Send id attribute to server for HTML based form classifier (Closed)
Patch Set: Fixed failed test Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_COMMON_FORM_FIELD_DATA_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_
6 #define COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_ 6 #define COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // the option_values/contents etc. 62 // the option_values/contents etc.
63 bool operator==(const FormFieldData& field) const; 63 bool operator==(const FormFieldData& field) const;
64 bool operator!=(const FormFieldData& field) const; 64 bool operator!=(const FormFieldData& field) const;
65 // Comparison operator exposed for STL map. Uses label, then name to sort. 65 // Comparison operator exposed for STL map. Uses label, then name to sort.
66 bool operator<(const FormFieldData& field) const; 66 bool operator<(const FormFieldData& field) const;
67 67
68 // If you add more, be sure to update the comparison operators, SameFieldAs, 68 // If you add more, be sure to update the comparison operators, SameFieldAs,
69 // serializing functions (in the .cc file) and the constructor. 69 // serializing functions (in the .cc file) and the constructor.
70 base::string16 label; 70 base::string16 label;
71 base::string16 name; 71 base::string16 name;
72 base::string16 id;
72 base::string16 value; 73 base::string16 value;
73 std::string form_control_type; 74 std::string form_control_type;
74 std::string autocomplete_attribute; 75 std::string autocomplete_attribute;
75 base::string16 placeholder; 76 base::string16 placeholder;
76 base::string16 css_classes; 77 base::string16 css_classes;
77 // Note: we use uint64_t instead of size_t because this struct is sent over 78 // Note: we use uint64_t instead of size_t because this struct is sent over
78 // IPC which could span 32 & 64 bit processes. We chose uint64_t instead of 79 // IPC which could span 32 & 64 bit processes. We chose uint64_t instead of
79 // uint32_t to maintain compatibility with old code which used size_t 80 // uint32_t to maintain compatibility with old code which used size_t
80 // (base::Pickle used to serialize that as 64 bit). 81 // (base::Pickle used to serialize that as 64 bit).
81 uint64_t max_length; 82 uint64_t max_length;
(...skipping 29 matching lines...) Expand all
111 EXPECT_EQ(expected.name, actual.name); \ 112 EXPECT_EQ(expected.name, actual.name); \
112 EXPECT_EQ(expected.value, actual.value); \ 113 EXPECT_EQ(expected.value, actual.value); \
113 EXPECT_EQ(expected.form_control_type, actual.form_control_type); \ 114 EXPECT_EQ(expected.form_control_type, actual.form_control_type); \
114 EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \ 115 EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \
115 EXPECT_EQ(expected.placeholder, actual.placeholder); \ 116 EXPECT_EQ(expected.placeholder, actual.placeholder); \
116 EXPECT_EQ(expected.max_length, actual.max_length); \ 117 EXPECT_EQ(expected.max_length, actual.max_length); \
117 EXPECT_EQ(expected.css_classes, actual.css_classes); \ 118 EXPECT_EQ(expected.css_classes, actual.css_classes); \
118 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \ 119 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
119 EXPECT_EQ(expected.check_status, actual.check_status); \ 120 EXPECT_EQ(expected.check_status, actual.check_status); \
120 EXPECT_EQ(expected.properties_mask, actual.properties_mask); \ 121 EXPECT_EQ(expected.properties_mask, actual.properties_mask); \
122 EXPECT_EQ(expected.id, actual.id); \
121 } while (0) 123 } while (0)
122 124
123 } // namespace autofill 125 } // namespace autofill
124 126
125 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_ 127 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698