Do not use GetProvisionalDocumentLoader in RFI::WillSendRequestInternal
Provisional document loader is going away (see step 8.d from the doc
linked to the bug), so we explicitly pass DocumentState and
ui::PageTransition to WillSendRequestInternal.
This required splitting GetTransitionType as well, since it uses
WebDocumentLoader internally.
Bug: 855189
Change-Id: I03e9f342d258e56c2eff97128fa8461f27f2fb5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1522334
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Commit-Queue: Dmitry Gozman <[email protected]>
Cr-Commit-Position: refs/heads/master@{#651817}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index a12dfe6..c2323ab 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -1235,10 +1235,6 @@
const GURL& url,
const CommitNavigationParams& commit_params);
- // Creates a placeholder document loader, while navigation is taking place,
- // either in the browser or in the renderer.
- bool CreatePlaceholderDocumentLoader(const blink::WebNavigationInfo& info);
-
// Sends a FrameHostMsg_BeginNavigation to the browser
void BeginNavigationInternal(std::unique_ptr<blink::WebNavigationInfo> info);
@@ -1284,8 +1280,14 @@
bool ShouldDisplayErrorPageForFailedLoad(int error_code,
const GURL& unreachable_url);
+ // |document_state| and |transition_type| correspond to the document which
+ // triggered this request. For main resource requests (navigations),
+ // |document_state| is a newly created one, and will be used for committing
+ // the navigation and creating the new document.
void WillSendRequestInternal(blink::WebURLRequest& request,
- ResourceType resource_type);
+ ResourceType resource_type,
+ DocumentState* document_state,
+ ui::PageTransition transition_type);
// Returns the URL being loaded by the |frame_|'s request.
GURL GetLoadingUrl() const;