OLD | NEW |
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/browser/contact_info.h" | 5 #include "components/autofill/core/browser/contact_info.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <ostream> | 8 #include <ostream> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 if (this == &info) | 153 if (this == &info) |
154 return *this; | 154 return *this; |
155 | 155 |
156 given_ = info.given_; | 156 given_ = info.given_; |
157 middle_ = info.middle_; | 157 middle_ = info.middle_; |
158 family_ = info.family_; | 158 family_ = info.family_; |
159 full_ = info.full_; | 159 full_ = info.full_; |
160 return *this; | 160 return *this; |
161 } | 161 } |
162 | 162 |
163 bool NameInfo::ParsedNamesAreEqual(const NameInfo& info) { | 163 bool NameInfo::ParsedNamesAreEqual(const NameInfo& info) const { |
164 l10n::CaseInsensitiveCompare compare; | 164 l10n::CaseInsensitiveCompare compare; |
165 return compare.StringsEqual(given_, info.given_) && | 165 return compare.StringsEqual(given_, info.given_) && |
166 compare.StringsEqual(middle_, info.middle_) && | 166 compare.StringsEqual(middle_, info.middle_) && |
167 compare.StringsEqual(family_, info.family_); | 167 compare.StringsEqual(family_, info.family_); |
168 } | 168 } |
169 | 169 |
170 void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const { | 170 void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const { |
171 supported_types->insert(NAME_FIRST); | 171 supported_types->insert(NAME_FIRST); |
172 supported_types->insert(NAME_MIDDLE); | 172 supported_types->insert(NAME_MIDDLE); |
173 supported_types->insert(NAME_LAST); | 173 supported_types->insert(NAME_LAST); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 return base::string16(); | 347 return base::string16(); |
348 } | 348 } |
349 | 349 |
350 void CompanyInfo::SetRawInfo(ServerFieldType type, | 350 void CompanyInfo::SetRawInfo(ServerFieldType type, |
351 const base::string16& value) { | 351 const base::string16& value) { |
352 DCHECK_EQ(COMPANY_NAME, type); | 352 DCHECK_EQ(COMPANY_NAME, type); |
353 company_name_ = value; | 353 company_name_ = value; |
354 } | 354 } |
355 | 355 |
356 } // namespace autofill | 356 } // namespace autofill |
OLD | NEW |