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

Unified Diff: chrome/browser/ui/browser.cc

Issue 2254273003: Remove text encoding UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 93b36dce53b8a81872b6653b810a61fcd9689e31..cbd2638fce7c6289338f586b55e91b9cad8ce190 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -38,7 +38,6 @@
#include "chrome/browser/banners/app_banner_manager_desktop.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
-#include "chrome/browser/character_encoding.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
@@ -828,38 +827,6 @@ bool Browser::CanSupportWindowFeature(WindowFeature feature) const {
return SupportsWindowFeatureImpl(feature, false);
}
-void Browser::ToggleEncodingAutoDetect() {
- content::RecordAction(UserMetricsAction("AutoDetectChange"));
- encoding_auto_detect_.SetValue(!encoding_auto_detect_.GetValue());
msw 2016/08/22 21:59:53 q: Can we remove Browser::encoding_auto_detect_?
Jinsuk Kim 2016/08/23 07:09:22 Yes. Removed.
- // If "auto detect" is turned on, then any current override encoding
- // is cleared. This also implicitly performs a reload.
- // OTOH, if "auto detect" is turned off, we don't change the currently
- // active encoding.
- if (encoding_auto_detect_.GetValue()) {
- WebContents* contents = tab_strip_model_->GetActiveWebContents();
- if (contents)
- contents->ResetOverrideEncoding();
- }
-}
-
-void Browser::OverrideEncoding(int encoding_id) {
- content::RecordAction(UserMetricsAction("OverrideEncoding"));
msw 2016/08/22 21:59:53 Please mark this action obsolete in tools/metrics/
Jinsuk Kim 2016/08/23 07:09:22 Done.
- const std::string selected_encoding =
- CharacterEncoding::GetCanonicalEncodingNameByCommandId(encoding_id);
- WebContents* contents = tab_strip_model_->GetActiveWebContents();
- if (!selected_encoding.empty() && contents)
- contents->SetOverrideEncoding(selected_encoding);
- // Update the list of recently selected encodings.
- std::string new_selected_encoding_list;
- if (CharacterEncoding::UpdateRecentlySelectedEncoding(
- profile_->GetPrefs()->GetString(prefs::kRecentlySelectedEncoding),
msw 2016/08/22 21:59:53 If this isn't used, clear this pref for users and
Jinsuk Kim 2016/08/23 07:09:22 Done.
- encoding_id,
- &new_selected_encoding_list)) {
- profile_->GetPrefs()->SetString(prefs::kRecentlySelectedEncoding,
- new_selected_encoding_list);
- }
-}
-
void Browser::OpenFile() {
content::RecordAction(UserMetricsAction("OpenFile"));
select_file_dialog_ = ui::SelectFileDialog::Create(

Powered by Google App Engine
This is Rietveld 408576698