Chromium Code Reviews| Index: chrome/browser/webdata/autofill_profile_syncable_service.cc |
| =================================================================== |
| --- chrome/browser/webdata/autofill_profile_syncable_service.cc (revision 192389) |
| +++ chrome/browser/webdata/autofill_profile_syncable_service.cc (working copy) |
| @@ -8,6 +8,8 @@ |
| #include "base/location.h" |
| #include "base/logging.h" |
| #include "base/utf_string_conversions.h" |
| +#include "chrome/browser/browser_process.h" |
| +#include "components/autofill/browser/autofill_country.h" |
| #include "components/autofill/browser/autofill_profile.h" |
| #include "components/autofill/browser/form_group.h" |
| #include "components/webdata/autofill/autofill_table.h" |
| @@ -315,8 +317,11 @@ |
| specifics.address_home_city(), profile) || diff; |
| diff = UpdateField(ADDRESS_HOME_STATE, |
| specifics.address_home_state(), profile) || diff; |
| - diff = UpdateField(ADDRESS_HOME_COUNTRY, |
| - specifics.address_home_country(), profile) || diff; |
| + string16 country_name_or_code = |
| + ASCIIToUTF16(specifics.address_home_country()); |
| + std::string country_code = AutofillCountry::GetCountryCode( |
| + country_name_or_code, g_browser_process->GetApplicationLocale()); |
|
Ilya Sherman
2013/04/05 05:18:01
Again, this happens on the DB thread (I think), so
jam
2013/04/05 06:45:54
Done.
jam
2013/04/05 06:45:54
Done.
|
| + diff = UpdateField(ADDRESS_HOME_COUNTRY, country_code, profile) || diff; |
| diff = UpdateField(ADDRESS_HOME_ZIP, |
| specifics.address_home_zip(), profile) || diff; |
| diff = UpdateMultivaluedField(EMAIL_ADDRESS, |