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

Unified Diff: components/autofill/browser/phone_number.cc

Issue 13488009: Remove application locale cache in autofill code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 9 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/browser/phone_number.cc
===================================================================
--- components/autofill/browser/phone_number.cc (revision 192175)
+++ components/autofill/browser/phone_number.cc (working copy)
@@ -169,7 +169,8 @@
if (!whole_number.empty()) {
string16 normalized_number =
autofill_i18n::NormalizePhoneNumber(text,
- GetRegion(*profile_, app_locale));
+ GetRegion(*profile_, app_locale),
+ app_locale);
if (normalized_number == whole_number)
matching_types->insert(PHONE_HOME_WHOLE_NUMBER);
}
@@ -178,7 +179,8 @@
void PhoneNumber::UpdateCacheIfNeeded(const std::string& app_locale) const {
std::string region = GetRegion(*profile_, app_locale);
if (!number_.empty() && cached_parsed_phone_.region() != region)
- cached_parsed_phone_ = autofill_i18n::PhoneObject(number_, region);
+ cached_parsed_phone_ =
+ autofill_i18n::PhoneObject(number_, region, app_locale);
}
PhoneNumber::PhoneCombineHelper::PhoneCombineHelper() {
@@ -230,7 +232,8 @@
}
return autofill_i18n::ConstructPhoneNumber(
- country_, city_, phone_, GetRegion(profile, app_locale), value);
+ country_, city_, phone_, GetRegion(profile, app_locale), app_locale,
+ value);
}
bool PhoneNumber::PhoneCombineHelper::IsEmpty() const {

Powered by Google App Engine
This is Rietveld 408576698