[Autofill] Rename {Get,Set}CanonicalizedInfo() to {Get,Set}Info(), and pass in the app locale.
Also:
* Pass the app locale to FormGroup::GetMatchingTypes(), FormGroup::GetNonEmptyTypes(), and CreditCard::UpdateFromImportedCard().
* Update PhoneNumber::GetRawInfo() to not rely on knowing the locale, and move all the code that depended on knowing the locale into PhoneNumber::GetInfo().
* Within the AutofillManager code, read the app locale on the UI thread, and pass it as a parameter to the worker thread.
BUG=100845
TEST=none (this is a refactoring change)
Review URL: https://chromiumcodereview.appspot.com/11417131
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171166 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/autofill/address_unittest.cc b/chrome/browser/autofill/address_unittest.cc
index 5f4c883..9dcda2ab 100644
--- a/chrome/browser/autofill/address_unittest.cc
+++ b/chrome/browser/autofill/address_unittest.cc
@@ -108,7 +108,8 @@
for (size_t i = 0; i < arraysize(kValidMatches); ++i) {
SCOPED_TRACE(kValidMatches[i]);
FieldTypeSet matching_types;
- address.GetMatchingTypes(ASCIIToUTF16(kValidMatches[i]), &matching_types);
+ address.GetMatchingTypes(ASCIIToUTF16(kValidMatches[i]), "US",
+ &matching_types);
ASSERT_EQ(1U, matching_types.size());
EXPECT_EQ(ADDRESS_HOME_COUNTRY, *matching_types.begin());
}
@@ -119,7 +120,8 @@
};
for (size_t i = 0; i < arraysize(kInvalidMatches); ++i) {
FieldTypeSet matching_types;
- address.GetMatchingTypes(ASCIIToUTF16(kInvalidMatches[i]), &matching_types);
+ address.GetMatchingTypes(ASCIIToUTF16(kInvalidMatches[i]), "US",
+ &matching_types);
EXPECT_EQ(0U, matching_types.size());
}
@@ -127,6 +129,6 @@
address.set_country_code("");
EXPECT_EQ(std::string(), address.country_code());
FieldTypeSet matching_types;
- address.GetMatchingTypes(ASCIIToUTF16("Garbage"), &matching_types);
+ address.GetMatchingTypes(ASCIIToUTF16("Garbage"), "US", &matching_types);
EXPECT_EQ(0U, matching_types.size());
}