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

Unified Diff: chrome/browser/browser.cc

Issue 173265: Bugfix for 2932 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
===================================================================
--- chrome/browser/browser.cc (revision 25594)
+++ chrome/browser/browser.cc (working copy)
@@ -1009,8 +1009,15 @@
void Browser::ToggleEncodingAutoDetect() {
UserMetrics::RecordAction(L"AutoDetectChange", profile_);
encoding_auto_detect_.SetValue(!encoding_auto_detect_.GetValue());
- // Reload the page so we can try to auto-detect the charset.
- Reload();
+ // 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()) {
+ TabContents* contents = GetSelectedTabContents();
+ if (contents)
+ contents->reset_override_encoding();
+ }
}
void Browser::OverrideEncoding(int encoding_id) {
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698