Index: content/browser/loader/resource_loader.cc |
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc |
index b43d5d627912dca5c3a702ecc3fae58ed44cfb5b..5b0a9f4a284fe0997a4486f6c9ea7e6293fba2c8 100644 |
--- a/content/browser/loader/resource_loader.cc |
+++ b/content/browser/loader/resource_loader.cc |
@@ -155,9 +155,15 @@ void ResourceLoader::ReportUploadProgress() { |
} |
} |
-void ResourceLoader::MarkAsTransferring() { |
+void ResourceLoader::MarkAsTransferring(const GURL& target_url) { |
+ CHECK_EQ(GetRequestInfo()->GetResourceType(), ResourceType::MAIN_FRAME) |
+ << "Cannot transfer non-main frame navigations"; |
is_transferring_ = true; |
+ // When transferring a request to another process, the renderer doesn't get |
+ // a chance to update the cookie policy URL. Do it here instead. |
+ request()->set_first_party_for_cookies(target_url); |
+ |
// When an URLRequest is transferred to a new RenderViewHost, its |
// ResourceHandler should not receive any notifications because it may depend |
// on the state of the old RVH. We set a ResourceHandler that only allows |