| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/autofill/country_combobox_model.h" | 5 #include "chrome/browser/ui/autofill/country_combobox_model.h" |
| 6 | 6 |
| 7 #include "chrome/browser/autofill/autofill_country.h" | 7 #include "components/autofill/browser/autofill_country.h" |
| 8 #include "ui/base/l10n/l10n_util_collator.h" | 8 #include "ui/base/l10n/l10n_util_collator.h" |
| 9 | 9 |
| 10 namespace autofill { | 10 namespace autofill { |
| 11 | 11 |
| 12 CountryComboboxModel::CountryComboboxModel() { | 12 CountryComboboxModel::CountryComboboxModel() { |
| 13 // Insert the default country at the top as well as in the ordered list. | 13 // Insert the default country at the top as well as in the ordered list. |
| 14 std::string app_locale = AutofillCountry::ApplicationLocale(); | 14 std::string app_locale = AutofillCountry::ApplicationLocale(); |
| 15 std::string default_country_code = | 15 std::string default_country_code = |
| 16 AutofillCountry::CountryCodeForLocale(app_locale); | 16 AutofillCountry::CountryCodeForLocale(app_locale); |
| 17 countries_.push_back(new AutofillCountry(default_country_code, app_locale)); | 17 countries_.push_back(new AutofillCountry(default_country_code, app_locale)); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 45 string16 CountryComboboxModel::GetItemAt(int index) { | 45 string16 CountryComboboxModel::GetItemAt(int index) { |
| 46 AutofillCountry* country = countries_[index]; | 46 AutofillCountry* country = countries_[index]; |
| 47 if (country) | 47 if (country) |
| 48 return countries_[index]->name(); | 48 return countries_[index]->name(); |
| 49 | 49 |
| 50 // The separator item. | 50 // The separator item. |
| 51 return ASCIIToUTF16("---"); | 51 return ASCIIToUTF16("---"); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace autofill | 54 } // namespace autofill |
| OLD | NEW |