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

Side by Side Diff: chrome/browser/ui/toolbar/encoding_menu_controller.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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/toolbar/encoding_menu_controller.h" 5 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/prefs/pref_service.h"
12 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/app/chrome_command_ids.h" 12 #include "chrome/app/chrome_command_ids.h"
14 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/character_encoding.h" 14 #include "chrome/browser/character_encoding.h"
16 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
18 #include "chrome/grit/generated_resources.h" 17 #include "chrome/grit/generated_resources.h"
18 #include "components/prefs/pref_service.h"
19 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
20 20
21 const int EncodingMenuController::kValidEncodingIds[] = { 21 const int EncodingMenuController::kValidEncodingIds[] = {
22 IDC_ENCODING_UTF8, 22 IDC_ENCODING_UTF8,
23 IDC_ENCODING_UTF16LE, 23 IDC_ENCODING_UTF16LE,
24 IDC_ENCODING_WINDOWS1252, 24 IDC_ENCODING_WINDOWS1252,
25 IDC_ENCODING_GBK, 25 IDC_ENCODING_GBK,
26 IDC_ENCODING_GB18030, 26 IDC_ENCODING_GB18030,
27 IDC_ENCODING_BIG5, 27 IDC_ENCODING_BIG5,
28 IDC_ENCODING_KOREAN, 28 IDC_ENCODING_KOREAN,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 for (it = encodings->begin(); it != encodings->end(); ++it) { 133 for (it = encodings->begin(); it != encodings->end(); ++it) {
134 if (it->encoding_id) { 134 if (it->encoding_id) {
135 base::string16 encoding = it->encoding_display_name; 135 base::string16 encoding = it->encoding_display_name;
136 base::i18n::AdjustStringForLocaleDirection(&encoding); 136 base::i18n::AdjustStringForLocaleDirection(&encoding);
137 menu_items->push_back(EncodingMenuItem(it->encoding_id, encoding)); 137 menu_items->push_back(EncodingMenuItem(it->encoding_id, encoding));
138 } else { 138 } else {
139 menu_items->push_back(separator); 139 menu_items->push_back(separator);
140 } 140 }
141 } 141 }
142 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698