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

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

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 #include "components/autofill/core/common/form_field_data.h" 5 #include "components/autofill/core/common/form_field_data.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 : max_length(0), 83 : max_length(0),
84 is_autofilled(false), 84 is_autofilled(false),
85 is_checked(false), 85 is_checked(false),
86 is_checkable(false), 86 is_checkable(false),
87 is_focusable(false), 87 is_focusable(false),
88 should_autocomplete(true), 88 should_autocomplete(true),
89 role(ROLE_ATTRIBUTE_OTHER), 89 role(ROLE_ATTRIBUTE_OTHER),
90 text_direction(base::i18n::UNKNOWN_DIRECTION) { 90 text_direction(base::i18n::UNKNOWN_DIRECTION) {
91 } 91 }
92 92
93 FormFieldData::FormFieldData(const FormFieldData& other) = default;
94
93 FormFieldData::~FormFieldData() { 95 FormFieldData::~FormFieldData() {
94 } 96 }
95 97
96 bool FormFieldData::SameFieldAs(const FormFieldData& field) const { 98 bool FormFieldData::SameFieldAs(const FormFieldData& field) const {
97 // A FormFieldData stores a value, but the value is not part of the identity 99 // A FormFieldData stores a value, but the value is not part of the identity
98 // of the field, so we don't want to compare the values. 100 // of the field, so we don't want to compare the values.
99 return label == field.label && name == field.name && 101 return label == field.label && name == field.name &&
100 form_control_type == field.form_control_type && 102 form_control_type == field.form_control_type &&
101 autocomplete_attribute == field.autocomplete_attribute && 103 autocomplete_attribute == field.autocomplete_attribute &&
102 max_length == field.max_length && 104 max_length == field.max_length &&
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 << " " << field.autocomplete_attribute << " " << field.max_length 212 << " " << field.autocomplete_attribute << " " << field.max_length
211 << " " << (field.is_autofilled ? "true" : "false") << " " 213 << " " << (field.is_autofilled ? "true" : "false") << " "
212 << (field.is_checked ? "true" : "false") << " " 214 << (field.is_checked ? "true" : "false") << " "
213 << (field.is_checkable ? "true" : "false") << " " 215 << (field.is_checkable ? "true" : "false") << " "
214 << (field.is_focusable ? "true" : "false") << " " 216 << (field.is_focusable ? "true" : "false") << " "
215 << (field.should_autocomplete ? "true" : "false") << " " 217 << (field.should_autocomplete ? "true" : "false") << " "
216 << field.role << " " << field.text_direction; 218 << field.role << " " << field.text_direction;
217 } 219 }
218 220
219 } // namespace autofill 221 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698