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..ec0828d30b0433ad4c5090de291ff3a37f1816a2 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) |
+ return false; |
+ } |
+ return true; |
+} |
+ |
} // namespace i18ninput |
} // namespace autofill |