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

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: Rebase 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 20 matching lines...) Expand all
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 {
41 l10n::CaseInsensitiveCompare compare; 41 return given_ == info.given_ && middle_ == info.middle_ &&
42 return compare.StringsEqual(given_, info.given_) && 42 family_ == info.family_;
43 compare.StringsEqual(middle_, info.middle_) &&
44 compare.StringsEqual(family_, info.family_);
45 } 43 }
46 44
47 void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const { 45 void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const {
48 supported_types->insert(NAME_FIRST); 46 supported_types->insert(NAME_FIRST);
49 supported_types->insert(NAME_MIDDLE); 47 supported_types->insert(NAME_MIDDLE);
50 supported_types->insert(NAME_LAST); 48 supported_types->insert(NAME_LAST);
51 supported_types->insert(NAME_MIDDLE_INITIAL); 49 supported_types->insert(NAME_MIDDLE_INITIAL);
52 supported_types->insert(NAME_FULL); 50 supported_types->insert(NAME_FULL);
53 } 51 }
54 52
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 return base::string16(); 222 return base::string16();
225 } 223 }
226 224
227 void CompanyInfo::SetRawInfo(ServerFieldType type, 225 void CompanyInfo::SetRawInfo(ServerFieldType type,
228 const base::string16& value) { 226 const base::string16& value) {
229 DCHECK_EQ(COMPANY_NAME, type); 227 DCHECK_EQ(COMPANY_NAME, type);
230 company_name_ = value; 228 company_name_ = value;
231 } 229 }
232 230
233 } // namespace autofill 231 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/contact_info.h ('k') | components/autofill/core/browser/contact_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698