| 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/core/browser/autofill_country.h" | 9 #include "components/autofill/core/browser/autofill_country.h" |
| 10 #include "components/autofill/core/browser/personal_data_manager.h" | 10 #include "components/autofill/core/browser/personal_data_manager.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 return countries_.size(); | 47 return countries_.size(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 base::string16 CountryComboboxModel::GetItemAt(int index) { | 50 base::string16 CountryComboboxModel::GetItemAt(int index) { |
| 51 AutofillCountry* country = countries_[index]; | 51 AutofillCountry* country = countries_[index]; |
| 52 if (country) | 52 if (country) |
| 53 return countries_[index]->name(); | 53 return countries_[index]->name(); |
| 54 | 54 |
| 55 // The separator item. Implemented for platforms that don't yet support | 55 // The separator item. Implemented for platforms that don't yet support |
| 56 // IsItemSeparatorAt(). | 56 // IsItemSeparatorAt(). |
| 57 return ASCIIToUTF16("---"); | 57 return base::ASCIIToUTF16("---"); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool CountryComboboxModel::IsItemSeparatorAt(int index) { | 60 bool CountryComboboxModel::IsItemSeparatorAt(int index) { |
| 61 return !countries_[index]; | 61 return !countries_[index]; |
| 62 } | 62 } |
| 63 | 63 |
| 64 } // namespace autofill | 64 } // namespace autofill |
| OLD | NEW |