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

Unified Diff: chrome/browser/webdata/web_database_migration_unittest.cc

Issue 13697002: Make autofill's Address store country using the country code so that app locale isn't needed for th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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/webdata/web_database_migration_unittest.cc
===================================================================
--- chrome/browser/webdata/web_database_migration_unittest.cc (revision 192389)
+++ chrome/browser/webdata/web_database_migration_unittest.cc (working copy)
@@ -20,6 +20,7 @@
#include "chrome/browser/webdata/web_apps_table.h"
#include "chrome/browser/webdata/web_intents_table.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "components/autofill/browser/autofill_country.h"
#include "components/autofill/browser/autofill_profile.h"
#include "components/autofill/browser/autofill_type.h"
#include "components/autofill/browser/credit_card.h"
@@ -57,7 +58,10 @@
profile->SetRawInfo(ADDRESS_HOME_CITY, s.ColumnString16(9));
profile->SetRawInfo(ADDRESS_HOME_STATE, s.ColumnString16(10));
profile->SetRawInfo(ADDRESS_HOME_ZIP, s.ColumnString16(11));
- profile->SetRawInfo(ADDRESS_HOME_COUNTRY, s.ColumnString16(12));
+ profile->SetRawInfo(
+ ADDRESS_HOME_COUNTRY,
+ ASCIIToUTF16(
+ AutofillCountry::GetCountryCode(s.ColumnString16(12), "en-US")));
Ilya Sherman 2013/04/05 05:18:01 Please use SetInfo() for this.
jam 2013/04/05 06:45:54 Done.
profile->SetRawInfo(PHONE_HOME_WHOLE_NUMBER, s.ColumnString16(13));
*date_modified = s.ColumnInt64(15);
profile->set_guid(s.ColumnString(16));
@@ -77,7 +81,10 @@
profile->SetRawInfo(ADDRESS_HOME_CITY, s.ColumnString16(4));
profile->SetRawInfo(ADDRESS_HOME_STATE, s.ColumnString16(5));
profile->SetRawInfo(ADDRESS_HOME_ZIP, s.ColumnString16(6));
- profile->SetRawInfo(ADDRESS_HOME_COUNTRY, s.ColumnString16(7));
+ profile->SetRawInfo(
+ ADDRESS_HOME_COUNTRY,
+ ASCIIToUTF16(
+ AutofillCountry::GetCountryCode(s.ColumnString16(7), "en-US")));
Ilya Sherman 2013/04/05 05:18:01 Please use SetInfo() for this.
jam 2013/04/05 06:45:54 Done.
*date_modified = s.ColumnInt64(8);
}

Powered by Google App Engine
This is Rietveld 408576698