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

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

Issue 1931123002: [Autofill] Make PersonalDataManager::OverwriteWith case sensitive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/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 19 matching lines...) Expand all
30 if (this == &info) 30 if (this == &info)
31 return *this; 31 return *this;
32 32
33 given_ = info.given_; 33 given_ = info.given_;
34 middle_ = info.middle_; 34 middle_ = info.middle_;
35 family_ = info.family_; 35 family_ = info.family_;
36 full_ = info.full_; 36 full_ = info.full_;
37 return *this; 37 return *this;
38 } 38 }
39 39
40 bool NameInfo::ParsedNamesAreEqual(const NameInfo& info) const { 40 bool NameInfo::ParsedNamesAreEqual(const NameInfo& info) const {
Mathieu 2016/04/29 12:23:03 update comment in .h
sebsg 2016/04/29 15:04:49 Done.
41 l10n::CaseInsensitiveCompare compare; 41 l10n::CaseInsensitiveCompare compare;
Mathieu 2016/04/29 12:23:03 no need for compare
sebsg 2016/04/29 15:04:49 Done.
42 return compare.StringsEqual(given_, info.given_) && 42 return given_ == info.given_ && middle_ == info.middle_ &&
43 compare.StringsEqual(middle_, info.middle_) && 43 family_ == info.family_;
44 compare.StringsEqual(family_, info.family_);
45 } 44 }
46 45
47 void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const { 46 void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const {
48 supported_types->insert(NAME_FIRST); 47 supported_types->insert(NAME_FIRST);
49 supported_types->insert(NAME_MIDDLE); 48 supported_types->insert(NAME_MIDDLE);
50 supported_types->insert(NAME_LAST); 49 supported_types->insert(NAME_LAST);
51 supported_types->insert(NAME_MIDDLE_INITIAL); 50 supported_types->insert(NAME_MIDDLE_INITIAL);
52 supported_types->insert(NAME_FULL); 51 supported_types->insert(NAME_FULL);
53 } 52 }
54 53
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 return base::string16(); 223 return base::string16();
225 } 224 }
226 225
227 void CompanyInfo::SetRawInfo(ServerFieldType type, 226 void CompanyInfo::SetRawInfo(ServerFieldType type,
228 const base::string16& value) { 227 const base::string16& value) {
229 DCHECK_EQ(COMPANY_NAME, type); 228 DCHECK_EQ(COMPANY_NAME, type);
230 company_name_ = value; 229 company_name_ = value;
231 } 230 }
232 231
233 } // namespace autofill 232 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698