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

Unified Diff: chrome/browser/autofill/personal_data_manager.cc

Issue 11783045: [Autofill] Ensure that clients pass the correct region info when parsing phone numbers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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: chrome/browser/autofill/personal_data_manager.cc
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index 14b6b177963ece26b241725d1e1bbfe794371d42..4db8574a1ab60295b9255fee8e98ef5a4fe75af8 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -294,7 +294,8 @@ bool PersonalDataManager::ImportFormData(
// Construct the phone number. Reject the profile if the number is invalid.
if (imported_profile.get() && !home.IsEmpty()) {
string16 constructed_number;
- if (!home.ParseNumber(imported_profile->CountryCode(),
+ if (!home.ParseNumber(*imported_profile,
+ app_locale,
&constructed_number) ||
!imported_profile->SetInfo(PHONE_HOME_WHOLE_NUMBER, constructed_number,
app_locale)) {

Powered by Google App Engine
This is Rietveld 408576698