| 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 16 matching lines...) Expand all Loading... |
| 27 NameInfo& NameInfo::operator=(const NameInfo& info) { | 27 NameInfo& NameInfo::operator=(const NameInfo& info) { |
| 28 if (this == &info) | 28 if (this == &info) |
| 29 return *this; | 29 return *this; |
| 30 | 30 |
| 31 first_ = info.first_; | 31 first_ = info.first_; |
| 32 middle_ = info.middle_; | 32 middle_ = info.middle_; |
| 33 last_ = info.last_; | 33 last_ = info.last_; |
| 34 return *this; | 34 return *this; |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool NameInfo::EqualsIgnoreCase(const NameInfo& info) { |
| 38 return (StringToLowerASCII(first_) == StringToLowerASCII(info.first_) && |
| 39 StringToLowerASCII(middle_) == StringToLowerASCII(info.middle_) && |
| 40 StringToLowerASCII(last_) == StringToLowerASCII(info.last_)); |
| 41 } |
| 42 |
| 37 void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const { | 43 void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const { |
| 38 supported_types->insert(NAME_FIRST); | 44 supported_types->insert(NAME_FIRST); |
| 39 supported_types->insert(NAME_MIDDLE); | 45 supported_types->insert(NAME_MIDDLE); |
| 40 supported_types->insert(NAME_LAST); | 46 supported_types->insert(NAME_LAST); |
| 41 supported_types->insert(NAME_MIDDLE_INITIAL); | 47 supported_types->insert(NAME_MIDDLE_INITIAL); |
| 42 supported_types->insert(NAME_FULL); | 48 supported_types->insert(NAME_FULL); |
| 43 } | 49 } |
| 44 | 50 |
| 45 base::string16 NameInfo::GetRawInfo(ServerFieldType type) const { | 51 base::string16 NameInfo::GetRawInfo(ServerFieldType type) const { |
| 46 DCHECK_EQ(NAME, AutofillType(type).group()); | 52 DCHECK_EQ(NAME, AutofillType(type).group()); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 return base::string16(); | 203 return base::string16(); |
| 198 } | 204 } |
| 199 | 205 |
| 200 void CompanyInfo::SetRawInfo(ServerFieldType type, | 206 void CompanyInfo::SetRawInfo(ServerFieldType type, |
| 201 const base::string16& value) { | 207 const base::string16& value) { |
| 202 DCHECK_EQ(COMPANY_NAME, type); | 208 DCHECK_EQ(COMPANY_NAME, type); |
| 203 company_name_ = value; | 209 company_name_ = value; |
| 204 } | 210 } |
| 205 | 211 |
| 206 } // namespace autofill | 212 } // namespace autofill |
| OLD | NEW |