summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 02:27:34 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 02:27:34 +0000
commit041b0bbba0efec8bd026aee1165e4be697cbf8ce (patch)
tree8c9ee6806d964c45252a56f911f3c43491a38fc4 /webkit/tools/test_shell
parent4eb0ece6c4b380e6af418ab15beda8c13ed08817 (diff)
downloadchromium_src-041b0bbba0efec8bd026aee1165e4be697cbf8ce.zip
chromium_src-041b0bbba0efec8bd026aee1165e4be697cbf8ce.tar.gz
chromium_src-041b0bbba0efec8bd026aee1165e4be697cbf8ce.tar.bz2
Use an explicit boolean has_new_first_party_for_cookies instead
of an empty, invalid URL to indicate whether the first party for cookies URL needs changing when following a redirect. R=eroman BUG=25133 TEST=none Review URL: http://codereview.chromium.org/405011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32260 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index 65f1640..512802a 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -153,12 +153,14 @@ class RequestProxy : public URLRequest::Delegate,
void NotifyReceivedRedirect(const GURL& new_url,
const ResourceLoaderBridge::ResponseInfo& info) {
+ bool has_new_first_party_for_cookies = false;
GURL new_first_party_for_cookies;
if (peer_ && peer_->OnReceivedRedirect(new_url, info,
+ &has_new_first_party_for_cookies,
&new_first_party_for_cookies)) {
io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
this, &RequestProxy::AsyncFollowDeferredRedirect,
- new_first_party_for_cookies));
+ has_new_first_party_for_cookies, new_first_party_for_cookies));
} else {
Cancel();
}
@@ -241,12 +243,13 @@ class RequestProxy : public URLRequest::Delegate,
Done();
}
- void AsyncFollowDeferredRedirect(const GURL& new_first_party_for_cookies) {
+ void AsyncFollowDeferredRedirect(bool has_new_first_party_for_cookies,
+ 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())
+ if (has_new_first_party_for_cookies)
request_->set_first_party_for_cookies(new_first_party_for_cookies);
request_->FollowDeferredRedirect();
}