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

Unified Diff: webkit/tools/test_shell/simple_resource_loader_bridge.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
« webkit/glue/resource_loader_bridge.h ('K') | « webkit/glue/weburlloader_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_resource_loader_bridge.cc
===================================================================
--- webkit/tools/test_shell/simple_resource_loader_bridge.cc (revision 31948)
+++ webkit/tools/test_shell/simple_resource_loader_bridge.cc (working copy)
@@ -153,9 +153,12 @@
void NotifyReceivedRedirect(const GURL& new_url,
const ResourceLoaderBridge::ResponseInfo& info) {
- if (peer_ && peer_->OnReceivedRedirect(new_url, info)) {
+ GURL new_first_party_for_cookies;
+ if (peer_ && peer_->OnReceivedRedirect(new_url, info,
+ &new_first_party_for_cookies)) {
io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &RequestProxy::AsyncFollowDeferredRedirect));
+ this, &RequestProxy::AsyncFollowDeferredRedirect,
+ new_first_party_for_cookies));
} else {
Cancel();
}
@@ -238,11 +241,13 @@
Done();
}
- void AsyncFollowDeferredRedirect() {
+ void AsyncFollowDeferredRedirect(const GURL& new_first_party_for_cookies) {
// This can be null in cases where the request is already done.
if (!request_.get())
return;
+ if (!new_first_party_for_cookies.is_empty())
+ request_->set_first_party_for_cookies(new_first_party_for_cookies);
request_->FollowDeferredRedirect();
}
« webkit/glue/resource_loader_bridge.h ('K') | « webkit/glue/weburlloader_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698