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

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

Issue 2857213005: PlzNavigate: implement process reuse for ServiceWorkers (Closed)
Patch Set: Addressed comments + fixed tests 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698