| 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_file_manager.h" | 5 #include "content/browser/download/download_file_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 DownloadFile* download_file = it->second; | 96 DownloadFile* download_file = it->second; |
| 97 VLOG(20) << __FUNCTION__ << "()" | 97 VLOG(20) << __FUNCTION__ << "()" |
| 98 << " download_file = " << download_file->DebugString(); | 98 << " download_file = " << download_file->DebugString(); |
| 99 download_file->Cancel(); | 99 download_file->Cancel(); |
| 100 | 100 |
| 101 EraseDownload(global_id); | 101 EraseDownload(global_id); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void DownloadFileManager::CompleteDownload( | 104 void DownloadFileManager::CompleteDownload( |
| 105 DownloadId global_id, const base::Closure& callback) { | 105 DownloadId global_id, const CompleteCompletionCallback& callback) { |
| 106 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 106 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 107 | 107 |
| 108 if (!ContainsKey(downloads_, global_id)) | 108 if (!ContainsKey(downloads_, global_id)) |
| 109 return; | 109 return; |
| 110 | 110 |
| 111 DownloadFile* download_file = downloads_[global_id]; | 111 DownloadFile* download_file = downloads_[global_id]; |
| 112 | 112 |
| 113 VLOG(20) << " " << __FUNCTION__ << "()" | 113 VLOG(20) << " " << __FUNCTION__ << "()" |
| 114 << " id = " << global_id | 114 << " id = " << global_id |
| 115 << " download_file = " << download_file->DebugString(); | 115 << " download_file = " << download_file->DebugString(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 DownloadFile* download_file = downloads_[global_id]; | 174 DownloadFile* download_file = downloads_[global_id]; |
| 175 | 175 |
| 176 VLOG(20) << " " << __FUNCTION__ << "()" | 176 VLOG(20) << " " << __FUNCTION__ << "()" |
| 177 << " id = " << global_id | 177 << " id = " << global_id |
| 178 << " download_file = " << download_file->DebugString(); | 178 << " download_file = " << download_file->DebugString(); |
| 179 | 179 |
| 180 downloads_.erase(global_id); | 180 downloads_.erase(global_id); |
| 181 | 181 |
| 182 delete download_file; | 182 delete download_file; |
| 183 } | 183 } |
| OLD | NEW |