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

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

Issue 11811: Get rid of ISO-8859-9 in the character encoding menu because it's now treated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/encoding_menu_controller_delegate.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) 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/character_encoding.h" 5 #include "chrome/browser/character_encoding.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { IDC_ENCODING_ISO885915, L"ISO-8859-15", IDS_ENCODING_WESTERN }, 46 { IDC_ENCODING_ISO885915, L"ISO-8859-15", IDS_ENCODING_WESTERN },
47 { IDC_ENCODING_MACINTOSH, L"macintosh", IDS_ENCODING_WESTERN }, 47 { IDC_ENCODING_MACINTOSH, L"macintosh", IDS_ENCODING_WESTERN },
48 { IDC_ENCODING_ISO88592, L"ISO-8859-2", IDS_ENCODING_CENTRAL_EUROPEAN }, 48 { IDC_ENCODING_ISO88592, L"ISO-8859-2", IDS_ENCODING_CENTRAL_EUROPEAN },
49 { IDC_ENCODING_WINDOWS1250, L"windows-1250", IDS_ENCODING_CENTRAL_EUROPEAN }, 49 { IDC_ENCODING_WINDOWS1250, L"windows-1250", IDS_ENCODING_CENTRAL_EUROPEAN },
50 { IDC_ENCODING_ISO88595, L"ISO-8859-5", IDS_ENCODING_CYRILLIC }, 50 { IDC_ENCODING_ISO88595, L"ISO-8859-5", IDS_ENCODING_CYRILLIC },
51 { IDC_ENCODING_WINDOWS1251, L"windows-1251", IDS_ENCODING_CYRILLIC }, 51 { IDC_ENCODING_WINDOWS1251, L"windows-1251", IDS_ENCODING_CYRILLIC },
52 { IDC_ENCODING_KOI8R, L"KOI8-R", IDS_ENCODING_CYRILLIC }, 52 { IDC_ENCODING_KOI8R, L"KOI8-R", IDS_ENCODING_CYRILLIC },
53 { IDC_ENCODING_KOI8U, L"KOI8-U", IDS_ENCODING_CYRILLIC }, 53 { IDC_ENCODING_KOI8U, L"KOI8-U", IDS_ENCODING_CYRILLIC },
54 { IDC_ENCODING_ISO88597, L"ISO-8859-7", IDS_ENCODING_GREEK }, 54 { IDC_ENCODING_ISO88597, L"ISO-8859-7", IDS_ENCODING_GREEK },
55 { IDC_ENCODING_WINDOWS1253, L"windows-1253", IDS_ENCODING_GREEK }, 55 { IDC_ENCODING_WINDOWS1253, L"windows-1253", IDS_ENCODING_GREEK },
56 { IDC_ENCODING_ISO88599, L"ISO-8859-9", IDS_ENCODING_TURKISH },
57 { IDC_ENCODING_WINDOWS1254, L"windows-1254", IDS_ENCODING_TURKISH }, 56 { IDC_ENCODING_WINDOWS1254, L"windows-1254", IDS_ENCODING_TURKISH },
58 { IDC_ENCODING_ISO88596, L"ISO-8859-6", IDS_ENCODING_ARABIC }, 57 { IDC_ENCODING_ISO88596, L"ISO-8859-6", IDS_ENCODING_ARABIC },
59 { IDC_ENCODING_WINDOWS1256, L"windows-1256", IDS_ENCODING_ARABIC }, 58 { IDC_ENCODING_WINDOWS1256, L"windows-1256", IDS_ENCODING_ARABIC },
60 { IDC_ENCODING_ISO88598, L"ISO-8859-8", IDS_ENCODING_HEBREW }, 59 { IDC_ENCODING_ISO88598, L"ISO-8859-8", IDS_ENCODING_HEBREW },
61 { IDC_ENCODING_WINDOWS1255, L"windows-1255", IDS_ENCODING_HEBREW }, 60 { IDC_ENCODING_WINDOWS1255, L"windows-1255", IDS_ENCODING_HEBREW },
62 { IDC_ENCODING_WINDOWS1258, L"windows-1258", IDS_ENCODING_VIETNAMESE }, 61 { IDC_ENCODING_WINDOWS1258, L"windows-1258", IDS_ENCODING_VIETNAMESE },
63 { IDC_ENCODING_ISO88594, L"ISO-8859-4", IDS_ENCODING_BALTIC }, 62 { IDC_ENCODING_ISO88594, L"ISO-8859-4", IDS_ENCODING_BALTIC },
64 { IDC_ENCODING_ISO885913, L"ISO-8859-13", IDS_ENCODING_BALTIC }, 63 { IDC_ENCODING_ISO885913, L"ISO-8859-13", IDS_ENCODING_BALTIC },
65 { IDC_ENCODING_WINDOWS1257, L"windows-1257", IDS_ENCODING_BALTIC }, 64 { IDC_ENCODING_WINDOWS1257, L"windows-1257", IDS_ENCODING_BALTIC },
66 { IDC_ENCODING_ISO88593, L"ISO-8859-3", IDS_ENCODING_SOUTH_EUROPEAN }, 65 { IDC_ENCODING_ISO88593, L"ISO-8859-3", IDS_ENCODING_SOUTH_EUROPEAN },
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 IDC_ENCODING_ISO88592, 170 IDC_ENCODING_ISO88592,
172 IDC_ENCODING_WINDOWS1250, 171 IDC_ENCODING_WINDOWS1250,
173 0, 172 0,
174 IDC_ENCODING_ISO88595, 173 IDC_ENCODING_ISO88595,
175 IDC_ENCODING_WINDOWS1251, 174 IDC_ENCODING_WINDOWS1251,
176 IDC_ENCODING_KOI8R, 175 IDC_ENCODING_KOI8R,
177 IDC_ENCODING_KOI8U, 176 IDC_ENCODING_KOI8U,
178 0, 177 0,
179 IDC_ENCODING_ISO88597, 178 IDC_ENCODING_ISO88597,
180 IDC_ENCODING_WINDOWS1253, 179 IDC_ENCODING_WINDOWS1253,
181 IDC_ENCODING_ISO88599,
182 IDC_ENCODING_WINDOWS1254, 180 IDC_ENCODING_WINDOWS1254,
183 IDC_ENCODING_ISO88596, 181 IDC_ENCODING_ISO88596,
184 IDC_ENCODING_WINDOWS1256, 182 IDC_ENCODING_WINDOWS1256,
185 IDC_ENCODING_ISO88598, 183 IDC_ENCODING_ISO88598,
186 IDC_ENCODING_WINDOWS1255, 184 IDC_ENCODING_WINDOWS1255,
187 IDC_ENCODING_WINDOWS1258, 185 IDC_ENCODING_WINDOWS1258,
188 186
189 IDC_ENCODING_ISO88594, 187 IDC_ENCODING_ISO88594,
190 IDC_ENCODING_ISO885913, 188 IDC_ENCODING_ISO885913,
191 IDC_ENCODING_WINDOWS1257, 189 IDC_ENCODING_WINDOWS1257,
(...skipping 21 matching lines...) Expand all
213 available_list->push_back(id); 211 available_list->push_back(id);
214 if (available_list->size() == maximum_size) 212 if (available_list->size() == maximum_size)
215 return; 213 return;
216 } 214 }
217 } 215 }
218 216
219 std::wstring GetEncodingDisplayName(std::wstring encoding_name, 217 std::wstring GetEncodingDisplayName(std::wstring encoding_name,
220 int category_string_id) { 218 int category_string_id) {
221 std::wstring category_name = l10n_util::GetString(category_string_id); 219 std::wstring category_name = l10n_util::GetString(category_string_id);
222 if (category_string_id != IDS_ENCODING_KOREAN && 220 if (category_string_id != IDS_ENCODING_KOREAN &&
223 category_string_id != IDS_ENCODING_THAI) { 221 category_string_id != IDS_ENCODING_THAI &&
222 category_string_id != IDS_ENCODING_TURKISH) {
224 return l10n_util::GetStringF(IDS_ENCODING_DISPLAY_TEMPLATE, 223 return l10n_util::GetStringF(IDS_ENCODING_DISPLAY_TEMPLATE,
225 category_name, 224 category_name,
226 encoding_name); 225 encoding_name);
227 } 226 }
228 return category_name; 227 return category_name;
229 } 228 }
230 229
231 } // namespace 230 } // namespace
232 231
233 // Static. 232 // Static.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 *selected_encodings = encoding_name; 426 *selected_encodings = encoding_name;
428 // Generate the string for rest selected encoding list. 427 // Generate the string for rest selected encoding list.
429 for (std::vector<int>::const_iterator it = selected_encoding_list.begin(); 428 for (std::vector<int>::const_iterator it = selected_encoding_list.begin();
430 it != selected_encoding_list.end(); ++it) { 429 it != selected_encoding_list.end(); ++it) {
431 selected_encodings->append(1, L','); 430 selected_encodings->append(1, L',');
432 selected_encodings->append(GetCanonicalEncodingNameByCommandId(*it)); 431 selected_encodings->append(GetCanonicalEncodingNameByCommandId(*it));
433 } 432 }
434 return true; 433 return true;
435 } 434 }
436 435
OLDNEW
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/encoding_menu_controller_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698