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

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: Fixed nits 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
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b9dec2a351adea7ba1dc2cf07114fee97bd77aee..0bd424ab69e3e71dd2096589be17c5d968350741 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -833,6 +833,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) {
@@ -883,15 +894,8 @@ bool NavigatorImpl::RequestNavigation(
int64 frame_tree_node_id = frame_tree_node->frame_tree_node_id();
FrameMsg_Navigate_Type::Value navigation_type =
GetNavigationType(controller_->GetBrowserContext(), entry, reload_type);
- scoped_ptr<NavigationRequest> navigation_request(new NavigationRequest(
- frame_tree_node,
- CommonNavigationParams(entry.GetURL(), entry.GetReferrer(),
- entry.GetTransitionType(), navigation_type,
- !entry.IsViewSourceMode()),
- CommitNavigationParams(entry.GetPageState(),
- entry.GetIsOverridingUserAgent(),
- navigation_start),
- &entry));
+ scoped_ptr<NavigationRequest> navigation_request = NavigationRequest::Create(
+ frame_tree_node, entry, navigation_type, navigation_start);
RequestNavigationParams request_params(entry.GetHasPostData(),
entry.extra_headers(),
entry.GetBrowserInitiatedPostData());
« no previous file with comments | « content/browser/frame_host/navigator_impl.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698