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

Unified Diff: chrome/browser/web_contents.cc

Issue 7894: Set |contents_mime_type| early enough so that the encoding menu is enabled on... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_contents.cc
===================================================================
--- chrome/browser/web_contents.cc (revision 3759)
+++ chrome/browser/web_contents.cc (working copy)
@@ -684,6 +684,13 @@
!render_manager_.showing_interstitial_page())
GetSiteInstance()->SetSite(params.url);
+ // Need to update MIME type here because it's referred to in
+ // UpdateNavigationCommands() called by RendererDidNavigate() to
+ // determine whether or not to enable the encoding menu.
+ // TODO(jungshik): Add a test for the encoding menu to avoid
+ // regressing it again.
+ contents_mime_type_ = params.contents_mime_type;
+
NavigationController::LoadCommittedDetails details;
if (!controller()->RendererDidNavigate(
params,
@@ -1436,9 +1443,6 @@
// Allow the new page to set the title again.
received_page_title_ = false;
- // Update contents MIME type of the main webframe.
- contents_mime_type_ = params.contents_mime_type;
-
// Get the favicon, either from history or request it from the net.
fav_icon_helper_.FetchFavIcon(details.entry->url());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698