| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |