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

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

Issue 6676031: Autofill database migration to clean up bogus profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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/autofill_country.cc
diff --git a/chrome/browser/autofill/autofill_country.cc b/chrome/browser/autofill/autofill_country.cc
index 11b7ef0f9ebebdc8f9568aeb4ea89251de626d49..610c0d87e49c1b94d010f106c9689446b90eb843 100644
--- a/chrome/browser/autofill/autofill_country.cc
+++ b/chrome/browser/autofill/autofill_country.cc
@@ -623,6 +623,11 @@ const std::string AutofillCountry::ApplicationLocale() {
return g_browser_process->GetApplicationLocale();
}
+bool AutofillCountry::IsValidCountry(const string16& value) {
+ std::string app_locale = ApplicationLocale();
+ return !GetCountryCode(value, app_locale).empty();
+}
+
AutofillCountry::AutofillCountry(const std::string& country_code,
const string16& name,
const string16& postal_code_label,
@@ -632,3 +637,4 @@ AutofillCountry::AutofillCountry(const std::string& country_code,
postal_code_label_(postal_code_label),
state_label_(state_label) {
}
+
Ilya Sherman 2011/03/16 04:58:57 nit: This line is extraneous.
dhollowa 2011/03/16 16:13:35 Done.

Powered by Google App Engine
This is Rietveld 408576698