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

Unified Diff: content/browser/loader/async_resource_handler.cc

Issue 264613006: Move first-party cookie URL logic to browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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
Index: content/browser/loader/async_resource_handler.cc
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc
index 7e3bd2ef99d5ef2bf030ced5a4ddcebcfa8b35b5..886c49a88ff761dc2ab13c2f48c217e14906cc3d 100644
--- a/content/browser/loader/async_resource_handler.cc
+++ b/content/browser/loader/async_resource_handler.cc
@@ -108,18 +108,12 @@ bool AsyncResourceHandler::OnMessageReceived(const IPC::Message& message,
return handled;
}
-void AsyncResourceHandler::OnFollowRedirect(
- int request_id,
- bool has_new_first_party_for_cookies,
- const GURL& new_first_party_for_cookies) {
+void AsyncResourceHandler::OnFollowRedirect(int request_id) {
if (!request()->status().is_success()) {
DVLOG(1) << "OnFollowRedirect for invalid request";
return;
}
- if (has_new_first_party_for_cookies)
- request()->set_first_party_for_cookies(new_first_party_for_cookies);
-
ResumeIfDeferred();
}
@@ -164,8 +158,13 @@ bool AsyncResourceHandler::OnRequestRedirected(int request_id,
reported_transfer_size_ = 0;
response->head.request_start = request()->creation_time();
response->head.response_start = TimeTicks::Now();
+ // TODO(davidben): Is it necessary to pass the new first party URL for
+ // cookies? The only case where it can change is top-level navigation requests
+ // and hopefully those will eventually all be owned by the browser. It's
+ // possible this is still needed while renderer-owned ones exist.
return info->filter()->Send(new ResourceMsg_ReceivedRedirect(
- request_id, new_url, response->head));
+ request_id, new_url, request()->first_party_for_cookies(),
+ response->head));
}
bool AsyncResourceHandler::OnResponseStarted(int request_id,
« no previous file with comments | « content/browser/loader/async_resource_handler.h ('k') | content/browser/loader/cross_site_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698