summaryrefslogtreecommitdiffstats
path: root/content/browser/download/download_resource_handler.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 01:05:18 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 01:05:18 +0000
commit05dd745bac0197fa28903d854e1e36df5fd9e6c1 (patch)
treed75be0cd4fd2ebe6f90ce340b96e186094301a4b /content/browser/download/download_resource_handler.cc
parentc986af50bebe985a8b610ad20151f571f9548d70 (diff)
downloadchromium_src-05dd745bac0197fa28903d854e1e36df5fd9e6c1.zip
chromium_src-05dd745bac0197fa28903d854e1e36df5fd9e6c1.tar.gz
chromium_src-05dd745bac0197fa28903d854e1e36df5fd9e6c1.tar.bz2
Correctly update cookie policy URL for downloads.
We should treat downloads like main frame navigations and update the cookie policy URLs on redirects. BUG=262860 R=asanka@chromium.org,rdsmith@chromium.org Review URL: https://chromiumcodereview.appspot.com/22935002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/download/download_resource_handler.cc')
-rw-r--r--content/browser/download/download_resource_handler.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 3b4844e..ed4edff 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -103,6 +103,9 @@ bool DownloadResourceHandler::OnRequestRedirected(
const GURL& url,
ResourceResponse* response,
bool* defer) {
+ // We treat a download as a main frame load, and thus update the policy URL
+ // on redirects.
+ request_->set_first_party_for_cookies(url);
return true;
}