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

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

Issue 374053007: Change PhoneNumber::SetInfo to only apply formatting where there is none (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix behavior Created 6 years, 5 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/phone_number_i18n.cc
diff --git a/components/autofill/core/browser/phone_number_i18n.cc b/components/autofill/core/browser/phone_number_i18n.cc
index 72b2e1f481849956d8091f5bc9adb460ff4ddc0c..7285252162d005acbc03c8ee9f75f383a0e9d877 100644
--- a/components/autofill/core/browser/phone_number_i18n.cc
+++ b/components/autofill/core/browser/phone_number_i18n.cc
@@ -141,9 +141,8 @@ bool ParsePhoneNumber(const base::string16& value,
if (i18n_number->has_country_code()) {
*country_code = base::UTF8ToUTF16(
base::StringPrintf("%d", i18n_number->country_code()));
- if (normalized_number.length() <= national_significant_number.length() &&
Evan Stade 2014/07/10 23:22:48 I don't know what the purpose of this check was. T
Ilya Sherman 2014/07/11 01:11:01 I'm also not sure. I guess if no tests fail, then
Evan Stade 2014/07/11 18:08:13 well, tests did fail, which caused me to look into
- !StartsWith(normalized_number, *country_code,
- true /* case_sensitive */)) {
+ if (!StartsWith(
+ normalized_number, *country_code, true /* case_sensitive */)) {
country_code->clear();
}
}
« no previous file with comments | « components/autofill/core/browser/phone_number.cc ('k') | components/autofill/core/browser/phone_number_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698