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

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

Issue 1728033002: components: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 12 matching lines...) Expand all
23 struct FormFieldData { 23 struct FormFieldData {
24 // Copied to components/autofill/ios/browser/resources/autofill_controller.js. 24 // Copied to components/autofill/ios/browser/resources/autofill_controller.js.
25 enum RoleAttribute { 25 enum RoleAttribute {
26 // "presentation" 26 // "presentation"
27 ROLE_ATTRIBUTE_PRESENTATION, 27 ROLE_ATTRIBUTE_PRESENTATION,
28 // Anything else. 28 // Anything else.
29 ROLE_ATTRIBUTE_OTHER, 29 ROLE_ATTRIBUTE_OTHER,
30 }; 30 };
31 31
32 FormFieldData(); 32 FormFieldData();
33 FormFieldData(const FormFieldData& other);
33 ~FormFieldData(); 34 ~FormFieldData();
34 35
35 // Returns true if two form fields are the same, not counting the value. 36 // Returns true if two form fields are the same, not counting the value.
36 bool SameFieldAs(const FormFieldData& field) const; 37 bool SameFieldAs(const FormFieldData& field) const;
37 38
38 // Comparison operator exposed for STL map. Uses label, then name to sort. 39 // Comparison operator exposed for STL map. Uses label, then name to sort.
39 bool operator<(const FormFieldData& field) const; 40 bool operator<(const FormFieldData& field) const;
40 41
41 // If you add more, be sure to update the comparison operator, SameFieldAs, 42 // If you add more, be sure to update the comparison operator, SameFieldAs,
42 // serializing functions (in the .cc file) and the constructor. 43 // serializing functions (in the .cc file) and the constructor.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \ 86 EXPECT_EQ(expected.autocomplete_attribute, actual.autocomplete_attribute); \
86 EXPECT_EQ(expected.max_length, actual.max_length); \ 87 EXPECT_EQ(expected.max_length, actual.max_length); \
87 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \ 88 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
88 EXPECT_EQ(expected.is_checked, actual.is_checked); \ 89 EXPECT_EQ(expected.is_checked, actual.is_checked); \
89 EXPECT_EQ(expected.is_checkable, actual.is_checkable); \ 90 EXPECT_EQ(expected.is_checkable, actual.is_checkable); \
90 } while (0) 91 } while (0)
91 92
92 } // namespace autofill 93 } // namespace autofill
93 94
94 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_ 95 #endif // COMPONENTS_AUTOFILL_CORE_COMMON_FORM_FIELD_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698