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

Side by Side Diff: chrome/browser/ui/autofill/country_combobox_model.cc

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | chrome/browser/ui/autofill/data_model_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698