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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc

Issue 172783003: rAc: don't show countries with partially supported address fields for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests Created 6 years, 10 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/ui/autofill/autofill_dialog_i18n_input.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc b/chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc
index dcd3eb25afd90b40e06a76b6b0df221ffc5af46b..1b0204f1d4d5748a2f84e12391796a065152c40a 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc
@@ -198,5 +198,16 @@ void CreateAddressData(
&address_data->address_lines);
}
+bool CountryIsFullySupported(const std::string& country_code) {
+ DCHECK_EQ(2U, country_code.size());
+ std::vector<::i18n::addressinput::AddressUiComponent> components =
+ ::i18n::addressinput::BuildComponents(country_code);
+ for (size_t i = 0; i < components.size(); ++i) {
+ if (components[i].field == ::i18n::addressinput::DEPENDENT_LOCALITY)
please use gerrit instead 2014/02/19 20:09:13 nit: add a "TODO(dbeam): Enable countries with DEP
Dan Beam 2014/02/19 20:16:53 Done.
+ return false;
+ }
+ return true;
+}
+
} // namespace i18ninput
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698