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

Side by Side Diff: content/browser/download/download_resource_handler.cc

Issue 1544603003: [Downloads] Do not store error responses during resumption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unify-downloader-core
Patch Set: Created 4 years, 10 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/download/download_resource_handler.h" 5 #include "content/browser/download/download_resource_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 BrowserThread::PostTask( 108 BrowserThread::PostTask(
109 BrowserThread::UI, FROM_HERE, 109 BrowserThread::UI, FROM_HERE,
110 base::Bind(&DeleteOnUIThread, base::Passed(&tab_info_))); 110 base::Bind(&DeleteOnUIThread, base::Passed(&tab_info_)));
111 } 111 }
112 } 112 }
113 113
114 bool DownloadResourceHandler::OnRequestRedirected( 114 bool DownloadResourceHandler::OnRequestRedirected(
115 const net::RedirectInfo& redirect_info, 115 const net::RedirectInfo& redirect_info,
116 ResourceResponse* response, 116 ResourceResponse* response,
117 bool* defer) { 117 bool* defer) {
118 return true; 118 return core_.OnRequestRedirected();
119 } 119 }
120 120
121 // Send the download creation information to the download thread. 121 // Send the download creation information to the download thread.
122 bool DownloadResourceHandler::OnResponseStarted( 122 bool DownloadResourceHandler::OnResponseStarted(
123 ResourceResponse* response, 123 ResourceResponse* response,
124 bool* defer) { 124 bool* defer) {
125 // The MIME type in ResourceResponse is the product of 125 // The MIME type in ResourceResponse is the product of
126 // MimeTypeResourceHandler. 126 // MimeTypeResourceHandler.
127 return core_.OnResponseStarted(response->head.mime_type); 127 return core_.OnResponseStarted(response->head.mime_type);
128 } 128 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 " }", 225 " }",
226 request() ? 226 request() ?
227 request()->url().spec().c_str() : 227 request()->url().spec().c_str() :
228 "<NULL request>", 228 "<NULL request>",
229 info->GetChildID(), 229 info->GetChildID(),
230 info->GetRequestID(), 230 info->GetRequestID(),
231 info->GetRouteID()); 231 info->GetRouteID());
232 } 232 }
233 233
234 } // namespace content 234 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_request_core.cc ('k') | content/browser/download/url_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698