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

Unified Diff: content/browser/tab_contents/navigation_controller.cc

Issue 6826015: Ensure URL is updated after a cross-site navigation is pre-empted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit test. Created 9 years, 8 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 | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/navigation_controller.cc
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc
index acefc38c0085e5c6cb3471bfc6a56e3d435b0132..ba75cd0ab43021ee1a50605b35eacd3e85af8410 100644
--- a/content/browser/tab_contents/navigation_controller.cc
+++ b/content/browser/tab_contents/navigation_controller.cc
@@ -533,8 +533,15 @@ bool NavigationController::RendererDidNavigate(
return false;
break;
case NavigationType::NAV_IGNORE:
- // There is nothing we can do with this navigation, so we just return to
+ // If a pending navigation was in progress, this canceled it. We should
+ // discard it and make sure it is removed from the URL bar. After that,
+ // there is nothing we can do with this navigation, so we just return to
// the caller that nothing has happened.
+ if (pending_entry_) {
+ DiscardNonCommittedEntries();
+ extra_invalidate_flags |= TabContents::INVALIDATE_URL;
+ tab_contents_->NotifyNavigationStateChanged(extra_invalidate_flags);
+ }
return false;
default:
NOTREACHED();
« no previous file with comments | « no previous file | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698