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

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

Issue 2857213005: PlzNavigate: implement process reuse for ServiceWorkers (Closed)
Patch Set: Fix compilation error Created 3 years, 7 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.h
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index 5d716dfe5019ed913907d2c96915337229f86689..1639269b2afe0be277add04a8ee69c753455c417 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 SetSpeculativeProcess(RenderProcessHost* speculative_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 SiteURL this navigation is navigating to. This is called on
Charlie Reis 2017/05/23 07:29:13 nit: Updates the destination site URL for this nav
clamy 2017/05/23 13:41:15 Done.
+ // 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 SiteURL of this navigation, as obtained from SiteInstance::GetSiteURL.
Charlie Reis 2017/05/23 07:29:13 nit: site URL
clamy 2017/05/23 13:41:15 Done.
+ 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 speculative_render_process_host_id_;
+
base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);

Powered by Google App Engine
This is Rietveld 408576698