Commit e782af8c authored by Matthias Körber's avatar Matthias Körber Committed by Commit Bot

Removed unused methods from autofill_address_utils.

Bug: 1007974
Change-Id: I72ac0310c8c6a70f932689e866db461c4f6536e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827007
Commit-Queue: Matthias Körber <koerber@google.com>
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700263}
parent 58f72275
......@@ -154,38 +154,4 @@ void GetAddressComponents(const std::string& country_code,
}
}
// Sets data related to the country <select>.
void SetCountryData(const PersonalDataManager& manager,
base::DictionaryValue* localized_strings,
const std::string& ui_language_code) {
autofill::CountryComboboxModel model;
model.SetCountries(manager, base::Callback<bool(const std::string&)>(),
ui_language_code);
const std::vector<std::unique_ptr<autofill::AutofillCountry>>& countries =
model.countries();
localized_strings->SetString("defaultCountryCode",
countries.front()->country_code());
// An ordered list of options to show in the <select>.
auto country_list = std::make_unique<base::ListValue>();
for (size_t i = 0; i < countries.size(); ++i) {
auto option_details = std::make_unique<base::DictionaryValue>();
option_details->SetString("name", model.GetItemAt(i));
option_details->SetString(
"value", countries[i] ? countries[i]->country_code() : "separator");
country_list->Append(std::move(option_details));
}
localized_strings->Set("autofillCountrySelectList", std::move(country_list));
auto default_country_components = std::make_unique<base::ListValue>();
std::string default_country_language_code;
GetAddressComponents(countries.front()->country_code(), ui_language_code,
default_country_components.get(),
&default_country_language_code);
localized_strings->Set("autofillDefaultCountryComponents",
std::move(default_country_components));
localized_strings->SetString("autofillDefaultCountryLanguageCode",
default_country_language_code);
}
} // namespace autofill
......@@ -75,11 +75,6 @@ void GetAddressComponents(const std::string& country_code,
base::ListValue* address_components,
std::string* components_language_code);
// Sets data related to the country combobox.
void SetCountryData(const PersonalDataManager& manager,
base::DictionaryValue* localized_strings,
const std::string& ui_language_code);
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ADDRESS_UTIL_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment