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

Unified Diff: chrome/browser/ui/webui/options/autofill_options_handler.cc

Issue 63053003: Ask libaddressinput for address components to use in requestAutocomplete(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base:: Created 6 years, 12 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/webui/options/autofill_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc
index 99d79a7f862288116d5f044c6f112b3cd8990a50..8cceb43b47094bde805c289f16aa7196c07e49fc 100644
--- a/chrome/browser/ui/webui/options/autofill_options_handler.cc
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc
@@ -44,10 +44,11 @@ const char kSettingsOrigin[] = "Chrome settings";
// Sets data related to the country <select>.
void SetCountryData(const PersonalDataManager& manager,
base::DictionaryValue* localized_strings) {
- autofill::CountryComboboxModel model(manager);
+ std::string default_country = manager.GetDefaultCountryCodeForNewAddress();
+ autofill::CountryComboboxModel model(default_country);
const std::vector<AutofillCountry*>& countries = model.countries();
localized_strings->SetString("defaultCountryCode",
- countries.front()->country_code());
+ model.GetDefaultCountryCode());
// An ordered list of options to show in the <select>.
scoped_ptr<base::ListValue> country_list(new base::ListValue());

Powered by Google App Engine
This is Rietveld 408576698