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

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

Issue 297973002: Navigation transitions: Block first response until after transitions have run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 6 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 257af02c01be003f8ff93c14e20ec99772d8b225..f51f6163be25361144596845cbd490d0b27ebe65 100644
--- a/content/browser/loader/cross_site_resource_handler.h
+++ b/content/browser/loader/cross_site_resource_handler.h
@@ -49,6 +49,14 @@ class CrossSiteResourceHandler : public LayeredResourceHandler {
CONTENT_EXPORT static void SetLeakRequestsForTesting(
bool leak_requests_for_testing);
+ // Navigations are deferred at OnResponseStarted to parse out any navigation
+ // transition link headers, and give the navigation transition (if it exists)
+ // a chance to run.
+ void ResumeResponseDeferredAtStart(int request_id);
+
+ // Returns whether the handler is deferred.
+ 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.
@@ -61,6 +69,12 @@ class CrossSiteResourceHandler : public LayeredResourceHandler {
ResourceResponse* response,
bool* defer);
+ bool OnNavigationTransitionResponseStarted(ResourceResponse* response,
+ bool* defer);
+
+ bool OnNormalResponseStarted(ResourceResponse* response,
+ bool* defer);
+
void ResumeOrTransfer(bool is_transfer);
void ResumeIfDeferred();
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/loader/cross_site_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698