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

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

Issue 1080883002: Remove some more bad ASCII-centric autofill code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 5 years, 8 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 b320a81ee5552a51f97e01438ee0400fa79770de..079a0413a904813db186b234a5e4ff3a844fc1f4 100644
--- a/components/autofill/core/browser/contact_info.cc
+++ b/components/autofill/core/browser/contact_info.cc
@@ -13,6 +13,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/autofill_type.h"
+#include "components/autofill/core/common/autofill_l10n_util.h"
namespace autofill {
@@ -160,12 +161,10 @@ NameInfo& NameInfo::operator=(const NameInfo& info) {
}
bool NameInfo::ParsedNamesAreEqual(const NameInfo& info) {
- return (base::StringToLowerASCII(given_) ==
- base::StringToLowerASCII(info.given_) &&
- base::StringToLowerASCII(middle_) ==
- base::StringToLowerASCII(info.middle_) &&
- base::StringToLowerASCII(family_) ==
- base::StringToLowerASCII(info.family_));
+ l10n::CaseInsensitiveCompare compare;
+ return compare.StringsEqual(given_, info.given_) &&
+ compare.StringsEqual(middle_, info.middle_) &&
+ compare.StringsEqual(family_, info.family_);
}
void NameInfo::GetSupportedTypes(ServerFieldTypeSet* supported_types) const {

Powered by Google App Engine
This is Rietveld 408576698