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

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

Issue 789643005: PlzNavigate: make content unit tests work with browser side navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cancel-navigations
Patch Set: Now addressing failures due to speculative RFH Created 5 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/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index c680cb199fecf72ebc900ce25a3088608063a288..2eab3d2b4e42b626b727c7e212916d1b1c2eb5be 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -835,6 +835,17 @@ NavigationRequest* NavigatorImpl::GetNavigationRequestForNodeForTesting(
return navigation_request_map_.get(frame_tree_node->frame_tree_node_id());
}
+bool NavigatorImpl::IsWaitingForBeforeUnloadACK(
+ FrameTreeNode* frame_tree_node) {
+ CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBrowserSideNavigation));
+ NavigationRequest* request =
+ navigation_request_map_.get(frame_tree_node->frame_tree_node_id());
+ if (!request)
+ return false;
+ return request->state() == NavigationRequest::WAITING_FOR_RENDERER_RESPONSE;
+}
+
void NavigatorImpl::LogResourceRequestTime(
base::TimeTicks timestamp, const GURL& url) {
if (navigation_data_ && navigation_data_->url_ == url) {

Powered by Google App Engine
This is Rietveld 408576698