| 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 "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "components/autofill/browser/autofill_country.h" | 9 #include "components/autofill/core/browser/autofill_country.h" |
| 10 #include "ui/base/l10n/l10n_util_collator.h" | 10 #include "ui/base/l10n/l10n_util_collator.h" |
| 11 | 11 |
| 12 namespace autofill { | 12 namespace autofill { |
| 13 | 13 |
| 14 CountryComboboxModel::CountryComboboxModel() { | 14 CountryComboboxModel::CountryComboboxModel() { |
| 15 // Insert the default country at the top as well as in the ordered list. | 15 // Insert the default country at the top as well as in the ordered list. |
| 16 std::string app_locale = g_browser_process->GetApplicationLocale(); | 16 std::string app_locale = g_browser_process->GetApplicationLocale(); |
| 17 std::string default_country_code = | 17 std::string default_country_code = |
| 18 AutofillCountry::CountryCodeForLocale(app_locale); | 18 AutofillCountry::CountryCodeForLocale(app_locale); |
| 19 countries_.push_back(new AutofillCountry(default_country_code, app_locale)); | 19 countries_.push_back(new AutofillCountry(default_country_code, app_locale)); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // The separator item. Implemented for platforms that don't yet support | 52 // The separator item. Implemented for platforms that don't yet support |
| 53 // IsItemSeparatorAt(). | 53 // IsItemSeparatorAt(). |
| 54 return ASCIIToUTF16("---"); | 54 return ASCIIToUTF16("---"); |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool CountryComboboxModel::IsItemSeparatorAt(int index) { | 57 bool CountryComboboxModel::IsItemSeparatorAt(int index) { |
| 58 return !countries_[index]; | 58 return !countries_[index]; |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace autofill | 61 } // namespace autofill |
| OLD | NEW |