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

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

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/external_tab_container.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/encoding_menu_controller.h" 5 #include "chrome/browser/encoding_menu_controller.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/rtl.h"
8 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
10 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/character_encoding.h" 12 #include "chrome/browser/character_encoding.h"
12 #include "chrome/browser/pref_service.h" 13 #include "chrome/browser/pref_service.h"
13 #include "chrome/browser/profile.h" 14 #include "chrome/browser/profile.h"
14 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
15 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
16 17
17 const int EncodingMenuController::kValidEncodingIds[] = { 18 const int EncodingMenuController::kValidEncodingIds[] = {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 prefs::kRecentlySelectedEncoding))); 129 prefs::kRecentlySelectedEncoding)));
129 DCHECK(encodings); 130 DCHECK(encodings);
130 DCHECK(!encodings->empty()); 131 DCHECK(!encodings->empty());
131 132
132 // Build up output list for menu. 133 // Build up output list for menu.
133 std::vector<CharacterEncoding::EncodingInfo>::const_iterator it; 134 std::vector<CharacterEncoding::EncodingInfo>::const_iterator it;
134 for (it = encodings->begin(); it != encodings->end(); ++it) { 135 for (it = encodings->begin(); it != encodings->end(); ++it) {
135 if (it->encoding_id) { 136 if (it->encoding_id) {
136 std::wstring encoding = it->encoding_display_name; 137 std::wstring encoding = it->encoding_display_name;
137 std::wstring bidi_safe_encoding; 138 std::wstring bidi_safe_encoding;
138 if (l10n_util::AdjustStringForLocaleDirection(encoding, 139 if (base::i18n::AdjustStringForLocaleDirection(encoding,
139 &bidi_safe_encoding)) 140 &bidi_safe_encoding))
140 encoding.swap(bidi_safe_encoding); 141 encoding.swap(bidi_safe_encoding);
141 menuItems->push_back(EncodingMenuItem(it->encoding_id, 142 menuItems->push_back(EncodingMenuItem(it->encoding_id,
142 WideToUTF16(encoding))); 143 WideToUTF16(encoding)));
143 } else { 144 } else {
144 menuItems->push_back(separator); 145 menuItems->push_back(separator);
145 } 146 }
146 } 147 }
147 } 148 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/external_tab_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698