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

Side by Side Diff: chrome/browser/default_encoding_combo_model.cc

Issue 5606002: Move:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/default_encoding_combo_model.h" 5 #include "chrome/browser/default_encoding_combo_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_collator.h" 8 #include "app/l10n_util_collator.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/prefs/pref_member.h" 11 #include "chrome/browser/prefs/pref_member.h"
12 #include "chrome/browser/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 14
15 DefaultEncodingComboboxModel::DefaultEncodingComboboxModel() { 15 DefaultEncodingComboboxModel::DefaultEncodingComboboxModel() {
16 // Initialize the vector of all sorted encodings according to current 16 // Initialize the vector of all sorted encodings according to current
17 // UI locale. 17 // UI locale.
18 std::string locale = g_browser_process->GetApplicationLocale(); 18 std::string locale = g_browser_process->GetApplicationLocale();
19 int size = CharacterEncoding::GetSupportCanonicalEncodingCount(); 19 int size = CharacterEncoding::GetSupportCanonicalEncodingCount();
20 for (int i = 0; i < size; ++i) { 20 for (int i = 0; i < size; ++i) {
21 sorted_encoding_list_.push_back(CharacterEncoding::EncodingInfo( 21 sorted_encoding_list_.push_back(CharacterEncoding::EncodingInfo(
22 CharacterEncoding::GetEncodingCommandIdByIndex(i))); 22 CharacterEncoding::GetEncodingCommandIdByIndex(i)));
(...skipping 25 matching lines...) Expand all
48 profile->GetPrefs(), 48 profile->GetPrefs(),
49 NULL); 49 NULL);
50 const std::string current_encoding = current_encoding_string.GetValue(); 50 const std::string current_encoding = current_encoding_string.GetValue();
51 for (int i = 0; i < GetItemCount(); ++i) { 51 for (int i = 0; i < GetItemCount(); ++i) {
52 if (GetEncodingCharsetByIndex(i) == current_encoding) 52 if (GetEncodingCharsetByIndex(i) == current_encoding)
53 return i; 53 return i;
54 } 54 }
55 55
56 return 0; 56 return 0;
57 } 57 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/extension_ports_remote_service.cc ('k') | chrome/browser/dom_ui/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698