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

Unified Diff: components/autofill/core/browser/contact_info.cc

Issue 261993006: Modified to allow to preserve two-word string in first-name and last-name in autofill profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated review comments and modified unit tests. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/contact_info.cc
diff --git a/components/autofill/core/browser/contact_info.cc b/components/autofill/core/browser/contact_info.cc
index 0793bb5ff310c507941a7edd69bca4dfe57345b3..c0028cf18ee680f587ad19ced31e4a908cd08e3b 100644
--- a/components/autofill/core/browser/contact_info.cc
+++ b/components/autofill/core/browser/contact_info.cc
@@ -34,6 +34,12 @@ NameInfo& NameInfo::operator=(const NameInfo& info) {
return *this;
}
+bool NameInfo::EqualsIgnoreCase(const NameInfo& info) {
+ return (StringToLowerASCII(first_) == StringToLowerASCII(info.first_) &&
+ StringToLowerASCII(middle_) == StringToLowerASCII(info.middle_) &&
+ StringToLowerASCII(last_) == StringToLowerASCII(info.last_));
+}
+
void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const {
supported_types->insert(NAME_FIRST);
supported_types->insert(NAME_MIDDLE);
« 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