Index: content/browser/frame_host/navigation_handle_impl.h |
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h |
index 5d716dfe5019ed913907d2c96915337229f86689..e74ed52878aba6cf9903d76db251e8ed49ea6131 100644 |
--- a/content/browser/frame_host/navigation_handle_impl.h |
+++ b/content/browser/frame_host/navigation_handle_impl.h |
@@ -380,6 +380,12 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
source_location_ = source_location; |
} |
+ // PlzNavigate |
+ // Sets ID of the RenderProcessHost we expect the navigation to commit in. |
+ // This is used to inform the RenderProcessHost to expect a navigation to the |
+ // url we're navigating to. |
+ void SetExpectedProcess(RenderProcessHost* expected_process); |
+ |
private: |
friend class NavigationHandleImplTest; |
@@ -426,6 +432,12 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
// WillStartRequest and WillRedirectRequest to prevent the navigation. |
bool IsSelfReferentialURL(); |
+ // Updates the destination site URL for this navigation. This is called on |
+ // redirects. |
+ // PlzNavigate: When redirected cross-site, the speculative RenderProcessHost |
+ // will stop expecting this navigation to commit. |
+ void UpdateSiteURL(); |
+ |
// See NavigationHandle for a description of those member variables. |
GURL url_; |
scoped_refptr<SiteInstance> starting_site_instance_; |
@@ -448,6 +460,9 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
// navigation encounters redirects. |
const GURL original_url_; |
+ // The site URL of this navigation, as obtained from SiteInstance::GetSiteURL. |
+ GURL site_url_; |
+ |
// The HTTP method used for the navigation. |
std::string method_; |
@@ -561,6 +576,11 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
// navigations initiated by Javascript. |
SourceLocation source_location_; |
+ // PlzNavigate |
+ // Used to inform a RenderProcessHost that we expect this navigation to commit |
+ // in it. |
+ int expected_render_process_host_id_; |
+ |
base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |