summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 20:56:15 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 20:56:15 +0000
commit8ab24cce8deeb1eca9ee4a9d55da86918ff2a578 (patch)
treeb566754c601ea93e5b806cf7cfade6074e6b57ad
parent26d41629bc7e6a76e064b92b2022089a0bf61a14 (diff)
downloadchromium_src-8ab24cce8deeb1eca9ee4a9d55da86918ff2a578.zip
chromium_src-8ab24cce8deeb1eca9ee4a9d55da86918ff2a578.tar.gz
chromium_src-8ab24cce8deeb1eca9ee4a9d55da86918ff2a578.tar.bz2
Fix for a bug where navigating from the NTP, to an SSL interstitial and then
a malware interstitial, the location bar would be empty (instead of showing the malware URL). This happens because when the second interstitial is shown, TabContents::GetDOMUIForCurrentState() thinks the current DOMUI is the NTP one, and therefore does not show the URL. Instead of messing with the complicated logic of GetDOMUIForCurrentState(), I made us always show the URL for interstitial, as it should be the case. BUG=26082 TEST=See bug steps. Also make sure navigating to SLL and malware interstitial works as expected and that the right URL is displayed everytime. Test that clickicng Continue/Revert as well as navigating from an interstitial works and that the right URL is displayed. Review URL: http://codereview.chromium.org/384013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31941 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index a670b0a..84dba1a 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -533,10 +533,12 @@ const std::wstring TabContents::GetDefaultTitle() const {
}
bool TabContents::ShouldDisplayURL() {
- // Don't hide the url in view source mode.
+ // Don't hide the url in view source mode and with interstitials.
NavigationEntry* entry = controller_.GetActiveEntry();
- if (entry && entry->IsViewSourceMode())
+ if (entry && (entry->IsViewSourceMode() ||
+ entry->page_type() == NavigationEntry::INTERSTITIAL_PAGE)) {
return true;
+ }
DOMUI* dom_ui = GetDOMUIForCurrentState();
if (dom_ui)