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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Remove surplus semicolon. Created 3 years, 11 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
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 8ed60813cfc8592fe75bd843f6931c59c078c1ba..8f4c0701ff696a2263192d2aa242c5cb625c3cb2 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -558,6 +558,13 @@ void NavigationHandleImpl::DidCommitNavigation(
state_ = DID_COMMIT_ERROR_PAGE;
} else {
state_ = DID_COMMIT;
+
+ // Getting this far means that the navigation was not blocked, and neither
+ // is this the error page navigation following a blocked navigation. Ensure
+ // the frame owner element is no longer collapsed as a result of a prior
+ // navigation having been blocked with BLOCK_REQUEST_AND_COLLAPSE.
+ if (!frame_tree_node()->IsMainFrame())
+ frame_tree_node()->SetFrameOwnerCollapsedState(false);
}
}
@@ -587,6 +594,7 @@ NavigationHandleImpl::CheckWillStartRequest() {
case NavigationThrottle::CANCEL:
case NavigationThrottle::CANCEL_AND_IGNORE:
case NavigationThrottle::BLOCK_REQUEST:
+ case NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE:
state_ = CANCELING;
return result;
@@ -618,6 +626,7 @@ NavigationHandleImpl::CheckWillRedirectRequest() {
case NavigationThrottle::CANCEL:
case NavigationThrottle::CANCEL_AND_IGNORE:
+ case NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE:
state_ = CANCELING;
return result;
@@ -665,6 +674,7 @@ NavigationHandleImpl::CheckWillProcessResponse() {
return result;
case NavigationThrottle::BLOCK_REQUEST:
+ case NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE:
NOTREACHED();
}
}

Powered by Google App Engine
This is Rietveld 408576698