summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 19:19:10 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 19:19:10 +0000
commit25396dab596e7e47262a8a9569c7570d72b1a5ea (patch)
tree47dc52b0a84bb59f78b163142fa86df9e77aaaee /chrome/browser/browser.cc
parent905e1d172dc2055a813b6cd30099ad747b8fe20b (diff)
downloadchromium_src-25396dab596e7e47262a8a9569c7570d72b1a5ea.zip
chromium_src-25396dab596e7e47262a8a9569c7570d72b1a5ea.tar.gz
chromium_src-25396dab596e7e47262a8a9569c7570d72b1a5ea.tar.bz2
Fixes navigation issues with interstitial pages.
Updates NavigationController so that the back and forward menus can be used while an interstitial page is showing. Also fixes tab cloning while an interstitial page is showing, so that the cloned tab does not have the interstitial navigation entry. BUG=37215 BUG=37894 TEST=SSLUITest.TestHTTPSExpiredCertAndGo{Back,Forward} TEST=NavigationControllerTest.CloneOmitsInterstitials Review URL: http://codereview.chromium.org/861001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 1c75cbc..46672ec 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -777,17 +777,7 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) {
void Browser::GoBack(WindowOpenDisposition disposition) {
UserMetrics::RecordAction("Back", profile_);
- // If we are showing an interstitial, just hide it.
TabContents* current_tab = GetSelectedTabContents();
- if (current_tab->interstitial_page()) {
- // The GoBack() case is a special case when an interstitial is shown because
- // the "previous" page is still available, just hidden by the interstitial.
- // We treat the back as a "Don't proceed", this hides the interstitial and
- // reveals the previous page.
- current_tab->interstitial_page()->DontProceed();
- return;
- }
-
if (current_tab->controller().CanGoBack()) {
NavigationController* controller = NULL;
if (disposition == NEW_FOREGROUND_TAB ||
@@ -796,6 +786,11 @@ void Browser::GoBack(WindowOpenDisposition disposition) {
tabstrip_model_.AddTabContents(cloned, -1, false,
PageTransition::LINK,
disposition == NEW_FOREGROUND_TAB);
+ if (current_tab->interstitial_page()) {
+ // The interstitial won't be copied to the new tab, so we don't need to
+ // go back.
+ return;
+ }
controller = &cloned->controller();
} else {
// Default disposition is CURRENT_TAB.