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

Unified Diff: chrome/browser/autofill/autofill_ie_toolbar_import_win.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
« no previous file with comments | « no previous file | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
diff --git a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
index aa08f0719085b13652b75868c31eae8bd733dcbb..77d3acaf0241dbd560348b472a8e760c5ab2c9d2 100644
--- a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
+++ b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "base/string16.h"
#include "base/win/registry.h"
+#include "chrome/browser/autofill/autofill_country.h"
#include "chrome/browser/autofill/autofill_profile.h"
#include "chrome/browser/autofill/credit_card.h"
#include "chrome/browser/autofill/crypto/rc4_decryptor.h"
@@ -157,10 +158,9 @@ bool ImportSingleProfile(FormGroup* profile,
}
// Now re-construct the phones if needed.
string16 constructed_number;
- if (!phone.IsEmpty() &&
- phone.ParseNumber(std::string("US"), &constructed_number)) {
+ const std::string app_locale = AutofillCountry::ApplicationLocale(),
dhollowa 2013/01/09 01:26:54 win compile problem.
Ilya Sherman 2013/01/09 01:29:10 Whoops. Fixed.
+ if (phone.ParseNumber(*profile, app_locale, &constructed_number))
profile->SetRawInfo(PHONE_HOME_WHOLE_NUMBER, constructed_number);
- }
return has_non_empty_fields;
}
« no previous file with comments | « no previous file | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698