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 // The DownloadManager object manages the process of downloading, including | 5 // The DownloadManager object manages the process of downloading, including |
6 // updates to the history system and providing the information for displaying | 6 // updates to the history system and providing the information for displaying |
7 // the downloads view in the Destinations tab. There is one DownloadManager per | 7 // the downloads view in the Destinations tab. There is one DownloadManager per |
8 // active browser context in Chrome. | 8 // active browser context in Chrome. |
9 // | 9 // |
10 // Download observers: | 10 // Download observers: |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 virtual void CancelDownload(int32 download_id) = 0; | 146 virtual void CancelDownload(int32 download_id) = 0; |
147 | 147 |
148 // Called when there is an error in the download. | 148 // Called when there is an error in the download. |
149 // |download_id| is the ID of the download. | 149 // |download_id| is the ID of the download. |
150 // |size| is the number of bytes that are currently downloaded. | 150 // |size| is the number of bytes that are currently downloaded. |
151 // |hash_state| is the current state of the hash of the data that has been | 151 // |hash_state| is the current state of the hash of the data that has been |
152 // downloaded. | 152 // downloaded. |
153 // |reason| is a download interrupt reason code. | 153 // |reason| is a download interrupt reason code. |
154 virtual void OnDownloadInterrupted( | 154 virtual void OnDownloadInterrupted( |
155 int32 download_id, | 155 int32 download_id, |
156 int64 size, | |
157 const std::string& hash_state, | |
158 DownloadInterruptReason reason) = 0; | 156 DownloadInterruptReason reason) = 0; |
159 | 157 |
160 // Remove downloads after remove_begin (inclusive) and before remove_end | 158 // Remove downloads after remove_begin (inclusive) and before remove_end |
161 // (exclusive). You may pass in null Time values to do an unbounded delete | 159 // (exclusive). You may pass in null Time values to do an unbounded delete |
162 // in either direction. | 160 // in either direction. |
163 virtual int RemoveDownloadsBetween(base::Time remove_begin, | 161 virtual int RemoveDownloadsBetween(base::Time remove_begin, |
164 base::Time remove_end) = 0; | 162 base::Time remove_end) = 0; |
165 | 163 |
166 // Remove downloads will delete all downloads that have a timestamp that is | 164 // Remove downloads will delete all downloads that have a timestamp that is |
167 // the same or more recent than |remove_begin|. The number of downloads | 165 // the same or more recent than |remove_begin|. The number of downloads |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 protected: | 246 protected: |
249 virtual ~DownloadManager() {} | 247 virtual ~DownloadManager() {} |
250 | 248 |
251 private: | 249 private: |
252 friend class base::RefCountedThreadSafe<DownloadManager>; | 250 friend class base::RefCountedThreadSafe<DownloadManager>; |
253 }; | 251 }; |
254 | 252 |
255 } // namespace content | 253 } // namespace content |
256 | 254 |
257 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 255 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
OLD | NEW |