summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 19:55:10 +0000
committerjungshik@google.com <jungshik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 19:55:10 +0000
commit2cfe388ab98dcd6771bb9795c673716d4eb62d05 (patch)
tree4be07b84b244d224a07637c87ee1db02a4889565 /chrome
parent41d8536ad1861b61dd251eab5dad3445b876bd94 (diff)
downloadchromium_src-2cfe388ab98dcd6771bb9795c673716d4eb62d05.zip
chromium_src-2cfe388ab98dcd6771bb9795c673716d4eb62d05.tar.gz
chromium_src-2cfe388ab98dcd6771bb9795c673716d4eb62d05.tar.bz2
Set |contents_mime_type| early enough so that the encoding menu is enabled on the first load of a page
in a tab. BUG=2929 TEST=Launch Chrome, go to www.google.com and make sure that the encoding menu is enabled. Review URL: http://codereview.chromium.org/7894 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3844 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/web_contents.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc
index 03346a8..40c9f78 100644
--- a/chrome/browser/web_contents.cc
+++ b/chrome/browser/web_contents.cc
@@ -685,6 +685,13 @@ void WebContents::DidNavigate(RenderViewHost* rvh,
!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,
@@ -1441,9 +1448,6 @@ void WebContents::DidNavigateMainFramePostCommit(
// 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());