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

Unified Diff: chrome/browser/ui/webui/settings/font_handler.cc

Issue 2254273003: Remove text encoding UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/font_handler.cc
diff --git a/chrome/browser/ui/webui/settings/font_handler.cc b/chrome/browser/ui/webui/settings/font_handler.cc
index 280b3c6c34f4fd1245dda9299c58feada55d4d43..03bd7c3ea6f85c752e9830ca4293f77e4ec02214 100644
--- a/chrome/browser/ui/webui/settings/font_handler.cc
+++ b/chrome/browser/ui/webui/settings/font_handler.cc
@@ -137,37 +137,8 @@ void FontHandler::FontListHasLoaded(std::string callback_id,
font->AppendString(has_rtl_chars ? "rtl" : "ltr");
}
- // Character encoding list.
- const std::vector<CharacterEncoding::EncodingInfo>* encodings;
- PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
- encodings = CharacterEncoding::GetCurrentDisplayEncodings(
- g_browser_process->GetApplicationLocale(),
- pref_service->GetString(prefs::kStaticEncodings),
- pref_service->GetString(prefs::kRecentlySelectedEncoding));
- DCHECK(!encodings->empty());
-
- std::unique_ptr<base::ListValue> encoding_list(new base::ListValue());
- for (const auto& it : *encodings) {
- std::unique_ptr<base::ListValue> option(new base::ListValue());
- if (it.encoding_id) {
- option->AppendString(
- CharacterEncoding::GetCanonicalEncodingNameByCommandId(
- it.encoding_id));
- option->AppendString(it.encoding_display_name);
- option->AppendString(
- base::i18n::StringContainsStrongRTLChars(it.encoding_display_name)
- ? "rtl"
- : "ltr");
- } else {
- // Add empty value to indicate a separator item.
- option->AppendString(std::string());
- }
- encoding_list->Append(std::move(option));
- }
-
base::DictionaryValue response;
response.Set("fontList", std::move(list));
- response.Set("encodingList", std::move(encoding_list));
GURL extension_url(extension_urls::GetWebstoreItemDetailURLPrefix());
response.SetString(

Powered by Google App Engine
This is Rietveld 408576698