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

Unified Diff: content/browser/download/download_file_manager.cc

Issue 10831302: Download resumption - Preliminary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed content unit tests. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_file_manager.cc
diff --git a/content/browser/download/download_file_manager.cc b/content/browser/download/download_file_manager.cc
index 7577208cf20139e4b2942b230b6cc5bc71d5b035..58356e7c574534450ed2950642d808363fab18bd 100644
--- a/content/browser/download/download_file_manager.cc
+++ b/content/browser/download/download_file_manager.cc
@@ -119,6 +119,24 @@ void DownloadFileManager::CompleteDownload(
EraseDownload(global_id);
}
+void DownloadFileManager::InterruptDownload(
+ DownloadId id, const base::Closure& callback) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+
+ if (!ContainsKey(downloads_, id))
+ return;
+
+ DownloadFile* download_file = downloads_[id];
+
+ VLOG(20) << " " << __FUNCTION__ << "()"
+ << " id = " << id
+ << " download_file = " << download_file->DebugString();
+
+ download_file->Detach(callback);
+
+ EraseDownload(id);
+}
+
void DownloadFileManager::OnDownloadManagerShutdown(DownloadManager* manager) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(manager);

Powered by Google App Engine
This is Rietveld 408576698