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

Unified Diff: content/browser/loader/cross_site_resource_handler.h

Issue 464593003: Don't swap out the old RenderFrameHost until the new one commits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase past PlzNavigate CL Created 6 years, 4 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/loader/cross_site_resource_handler.h
diff --git a/content/browser/loader/cross_site_resource_handler.h b/content/browser/loader/cross_site_resource_handler.h
index ef29d90fa2e4bb055e99a7fcf25d7cae83b40cdc..bdd430d2002d93365e3603dc437885aecf7f1445 100644
--- a/content/browser/loader/cross_site_resource_handler.h
+++ b/content/browser/loader/cross_site_resource_handler.h
@@ -19,11 +19,11 @@ namespace content {
struct TransitionLayerData;
-// Ensures that cross-site responses are delayed until the onunload handler of
-// the previous page is allowed to run. This handler wraps an
-// AsyncEventHandler, and it sits inside SafeBrowsing and Buffered event
-// handlers. This is important, so that it can intercept OnResponseStarted
-// after we determine that a response is safe and not a download.
+// Ensures that responses are delayed for navigations that must be transferred
+// to a different process. This handler wraps an AsyncEventHandler, and it sits
+// inside SafeBrowsing and Buffered event handlers. This is important, so that
+// it can intercept OnResponseStarted after we determine that a response is safe
+// and not a download.
class CrossSiteResourceHandler : public LayeredResourceHandler {
public:
CrossSiteResourceHandler(scoped_ptr<ResourceHandler> next_handler,
@@ -60,10 +60,9 @@ class CrossSiteResourceHandler : public LayeredResourceHandler {
bool did_defer_for_testing() const { return did_defer_; }
private:
- // Prepare to render the cross-site response in a new RenderViewHost, by
- // telling the old RenderViewHost to run its onunload handler.
- void StartCrossSiteTransition(ResourceResponse* response,
- bool should_transfer);
+ // Prepare to transfer the cross-site response to a new RenderFrameHost, by
+ // asking it to issue an identical request (on the UI thread).
+ void StartCrossSiteTransition(ResourceResponse* response);
// Defer the navigation to the UI thread to check whether transfer is required
// or not. Currently only used in --site-per-process.

Powered by Google App Engine
This is Rietveld 408576698