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

Side by Side Diff: components/autofill/core/browser/contact_info.cc

Issue 21947003: [Autofill] Move FieldTypeGroup out of the AutofillType class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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 | Annotate | Revision Log
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/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
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
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
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_type_unittest.cc ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698