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

Unified Diff: webkit/glue/weburlloader_impl.cc

Issue 385024: Propagate the "first party for cookies" from WebKit through the resource... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 1 month 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: webkit/glue/weburlloader_impl.cc
===================================================================
--- webkit/glue/weburlloader_impl.cc (revision 31948)
+++ webkit/glue/weburlloader_impl.cc (working copy)
@@ -185,7 +185,7 @@
}
}
-} // namespace
+} // namespace
// WebURLLoaderImpl::Context --------------------------------------------------
@@ -209,7 +209,9 @@
// ResourceLoaderBridge::Peer methods:
virtual void OnUploadProgress(uint64 position, uint64 size);
virtual bool OnReceivedRedirect(
- const GURL& new_url, const ResourceLoaderBridge::ResponseInfo& info);
+ const GURL& new_url,
+ const ResourceLoaderBridge::ResponseInfo& info,
+ GURL* new_first_party_for_cookies);
virtual void OnReceivedResponse(
const ResourceLoaderBridge::ResponseInfo& info, bool content_filtered);
virtual void OnReceivedData(const char* data, int len);
@@ -388,7 +390,8 @@
bool WebURLLoaderImpl::Context::OnReceivedRedirect(
const GURL& new_url,
- const ResourceLoaderBridge::ResponseInfo& info) {
+ const ResourceLoaderBridge::ResponseInfo& info,
+ GURL* new_first_party_for_cookies) {
if (!client_)
return false;
@@ -403,8 +406,9 @@
if (response.httpStatusCode() == 307)
new_request.setHTTPMethod(request_.httpMethod());
+ client_->willSendRequest(loader_, new_request, response);
request_ = new_request;
- client_->willSendRequest(loader_, new_request, response);
+ *new_first_party_for_cookies = request_.firstPartyForCookies();
// Only follow the redirect if WebKit left the URL unmodified.
if (new_url == GURL(new_request.url()))

Powered by Google App Engine
This is Rietveld 408576698