diff options
author | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-10 19:35:02 +0000 |
---|---|---|
committer | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-10 19:35:02 +0000 |
commit | 3d3c846fb3a515a3ec47e1e8c88d119f73caeeec (patch) | |
tree | 3c87876a63b32c5ecdd3d159c1845f2eb15494df | |
parent | ca595c8f7a5213fc146ef578f5e49f9316d0ee90 (diff) | |
download | chromium_src-3d3c846fb3a515a3ec47e1e8c88d119f73caeeec.zip chromium_src-3d3c846fb3a515a3ec47e1e8c88d119f73caeeec.tar.gz chromium_src-3d3c846fb3a515a3ec47e1e8c88d119f73caeeec.tar.bz2 |
Disable caching when downloading.
BUG=22900
BUG=100529
Review URL: http://codereview.chromium.org/8494015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109479 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/download/download_resource_handler.cc | 4 | ||||
-rw-r--r-- | content/browser/renderer_host/resource_dispatcher_host.cc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc index 6be964c..d703e14 100644 --- a/content/browser/download/download_resource_handler.cc +++ b/content/browser/download/download_resource_handler.cc @@ -79,6 +79,10 @@ bool DownloadResourceHandler::OnResponseStarted(int request_id, VLOG(20) << __FUNCTION__ << "()" << DebugString() << " request_id = " << request_id; download_start_time_ = base::TimeTicks::Now(); + + // If it's a download, we don't want to poison the cache with it. + request_->StopCaching(); + std::string content_disposition; request_->GetResponseHeaderByName("content-disposition", &content_disposition); diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc index 7fa8c61..76a5fbf 100644 --- a/content/browser/renderer_host/resource_dispatcher_host.cc +++ b/content/browser/renderer_host/resource_dispatcher_host.cc @@ -823,7 +823,7 @@ void ResourceDispatcherHost::BeginDownload( request->set_method("GET"); request->set_context(request_context); request->set_load_flags(request->load_flags() | - net::LOAD_IS_DOWNLOAD); + net::LOAD_IS_DOWNLOAD | net::LOAD_DISABLE_CACHE); // Check if the renderer is permitted to request the requested URL. if (!ChildProcessSecurityPolicy::GetInstance()-> |