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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 return MiddleInitial(); | 67 return MiddleInitial(); |
68 | 68 |
69 if (type == NAME_FULL) | 69 if (type == NAME_FULL) |
70 return FullName(); | 70 return FullName(); |
71 | 71 |
72 return base::string16(); | 72 return base::string16(); |
73 } | 73 } |
74 | 74 |
75 void NameInfo::SetRawInfo(AutofillFieldType type, const base::string16& value) { | 75 void NameInfo::SetRawInfo(AutofillFieldType type, const base::string16& value) { |
76 type = AutofillType::GetEquivalentFieldType(type); | 76 type = AutofillType::GetEquivalentFieldType(type); |
77 DCHECK_EQ(AutofillType::NAME, AutofillType(type).group()); | 77 DCHECK_EQ(NAME, AutofillType(type).group()); |
78 if (type == NAME_FIRST) | 78 if (type == NAME_FIRST) |
79 first_ = value; | 79 first_ = value; |
80 else if (type == NAME_MIDDLE || type == NAME_MIDDLE_INITIAL) | 80 else if (type == NAME_MIDDLE || type == NAME_MIDDLE_INITIAL) |
81 middle_ = value; | 81 middle_ = value; |
82 else if (type == NAME_LAST) | 82 else if (type == NAME_LAST) |
83 last_ = value; | 83 last_ = value; |
84 else if (type == NAME_FULL) | 84 else if (type == NAME_FULL) |
85 SetFullName(value); | 85 SetFullName(value); |
86 else | 86 else |
87 NOTREACHED(); | 87 NOTREACHED(); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 return base::string16(); | 195 return base::string16(); |
196 } | 196 } |
197 | 197 |
198 void CompanyInfo::SetRawInfo(AutofillFieldType type, | 198 void CompanyInfo::SetRawInfo(AutofillFieldType type, |
199 const base::string16& value) { | 199 const base::string16& value) { |
200 DCHECK_EQ(COMPANY_NAME, type); | 200 DCHECK_EQ(COMPANY_NAME, type); |
201 company_name_ = value; | 201 company_name_ = value; |
202 } | 202 } |
203 | 203 |
204 } // namespace autofill | 204 } // namespace autofill |
OLD | NEW |