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

Side by Side Diff: chrome/browser/views/options/fonts_page_view.cc

Issue 126223: Replace std:;wstring with std::string in locale-name related APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/options/fonts_page_view.h" 5 #include "chrome/browser/views/options/fonts_page_view.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
(...skipping 28 matching lines...) Expand all
39 } // namespace 39 } // namespace
40 40
41 class DefaultEncodingComboboxModel : public views::Combobox::Model { 41 class DefaultEncodingComboboxModel : public views::Combobox::Model {
42 public: 42 public:
43 DefaultEncodingComboboxModel() { 43 DefaultEncodingComboboxModel() {
44 canonical_encoding_names_length_ = 44 canonical_encoding_names_length_ =
45 CharacterEncoding::GetSupportCanonicalEncodingCount(); 45 CharacterEncoding::GetSupportCanonicalEncodingCount();
46 // Initialize the vector of all sorted encodings according to current 46 // Initialize the vector of all sorted encodings according to current
47 // UI locale. 47 // UI locale.
48 if (!sorted_encoding_list.size()) { 48 if (!sorted_encoding_list.size()) {
49 std::wstring locale = g_browser_process->GetApplicationLocale(); 49 std::string locale = g_browser_process->GetApplicationLocale();
50 for (int i = 0; i < canonical_encoding_names_length_; i++) { 50 for (int i = 0; i < canonical_encoding_names_length_; i++) {
51 sorted_encoding_list.push_back(CharacterEncoding::EncodingInfo( 51 sorted_encoding_list.push_back(CharacterEncoding::EncodingInfo(
52 CharacterEncoding::GetEncodingCommandIdByIndex(i))); 52 CharacterEncoding::GetEncodingCommandIdByIndex(i)));
53 } 53 }
54 l10n_util::SortVectorWithStringKey(locale, &sorted_encoding_list, true); 54 l10n_util::SortVectorWithStringKey(locale, &sorted_encoding_list, true);
55 } 55 }
56 } 56 }
57 57
58 virtual ~DefaultEncodingComboboxModel() {} 58 virtual ~DefaultEncodingComboboxModel() {}
59 59
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); 482 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing);
483 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, 483 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
484 GridLayout::USE_PREF, 0, 0); 484 GridLayout::USE_PREF, 0, 0);
485 485
486 // Add Encoding Combobox. 486 // Add Encoding Combobox.
487 layout->StartRow(0, double_column_view_set_id); 487 layout->StartRow(0, double_column_view_set_id);
488 layout->AddView(default_encoding_combobox_label_); 488 layout->AddView(default_encoding_combobox_label_);
489 layout->AddView(default_encoding_combobox_, 1, 1, GridLayout::FILL, 489 layout->AddView(default_encoding_combobox_, 1, 1, GridLayout::FILL,
490 GridLayout::CENTER); 490 GridLayout::CENTER);
491 } 491 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu_mac.mm ('k') | chrome/browser/views/options/language_combobox_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698