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

Side by Side Diff: content/browser/download/download_file_manager.h

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 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 // The DownloadFileManager owns a set of DownloadFile objects, each of which 5 // The DownloadFileManager owns a set of DownloadFile objects, each of which
6 // represent one in progress download and performs the disk IO for that 6 // represent one in progress download and performs the disk IO for that
7 // download. The DownloadFileManager itself is a singleton object owned by the 7 // download. The DownloadFileManager itself is a singleton object owned by the
8 // ResourceDispatcherHostImpl. 8 // ResourceDispatcherHostImpl.
9 // 9 //
10 // The DownloadFileManager uses the file_thread for performing file write 10 // The DownloadFileManager uses the file_thread for performing file write
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Handlers for notifications sent from the UI thread and run on the 106 // Handlers for notifications sent from the UI thread and run on the
107 // FILE thread. These are both terminal actions with respect to the 107 // FILE thread. These are both terminal actions with respect to the
108 // download file, as far as the DownloadFileManager is concerned -- if 108 // download file, as far as the DownloadFileManager is concerned -- if
109 // anything happens to the download file after they are called, it will 109 // anything happens to the download file after they are called, it will
110 // be ignored. 110 // be ignored.
111 // We call back to the UI thread in the case of CompleteDownload so that 111 // We call back to the UI thread in the case of CompleteDownload so that
112 // we know when we can hand the file off to other consumers. 112 // we know when we can hand the file off to other consumers.
113 virtual void CancelDownload(content::DownloadId id); 113 virtual void CancelDownload(content::DownloadId id);
114 virtual void CompleteDownload(content::DownloadId id, 114 virtual void CompleteDownload(content::DownloadId id,
115 const base::Closure& callback); 115 const base::Closure& callback);
116 virtual void InterruptDownload(content::DownloadId id,
117 const base::Closure& callback);
116 118
117 // Called on FILE thread by DownloadManager at the beginning of its shutdown. 119 // Called on FILE thread by DownloadManager at the beginning of its shutdown.
118 virtual void OnDownloadManagerShutdown(content::DownloadManager* manager); 120 virtual void OnDownloadManagerShutdown(content::DownloadManager* manager);
119 121
120 // Rename the download file, uniquifying if overwrite was not requested. 122 // Rename the download file, uniquifying if overwrite was not requested.
121 virtual void RenameDownloadFile( 123 virtual void RenameDownloadFile(
122 content::DownloadId id, 124 content::DownloadId id,
123 const FilePath& full_path, 125 const FilePath& full_path,
124 bool overwrite_existing_file, 126 bool overwrite_existing_file,
125 const RenameCompletionCallback& callback); 127 const RenameCompletionCallback& callback);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 163
162 // A map of all in progress downloads. It owns the download files. 164 // A map of all in progress downloads. It owns the download files.
163 DownloadFileMap downloads_; 165 DownloadFileMap downloads_;
164 166
165 scoped_ptr<content::DownloadFileFactory> download_file_factory_; 167 scoped_ptr<content::DownloadFileFactory> download_file_factory_;
166 168
167 DISALLOW_COPY_AND_ASSIGN(DownloadFileManager); 169 DISALLOW_COPY_AND_ASSIGN(DownloadFileManager);
168 }; 170 };
169 171
170 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_ 172 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698