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

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

Issue 7646025: Detect file system errors during downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed namespace for MockFileStream. Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Each download is represented by a DownloadItem, and all DownloadItems 5 // Each download is represented by a DownloadItem, and all DownloadItems
6 // are owned by the DownloadManager which maintains a global list of all 6 // are owned by the DownloadManager which maintains a global list of all
7 // downloads. DownloadItems are created when a user initiates a download, 7 // downloads. DownloadItems are created when a user initiates a download,
8 // and exist for the duration of the browser life time. 8 // and exist for the duration of the browser life time.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // DownloadManagerDelegate::ShouldCompleteDownload. 174 // DownloadManagerDelegate::ShouldCompleteDownload.
175 void CompleteDelayedDownload(); 175 void CompleteDelayedDownload();
176 176
177 // Called when all data has been saved. Only has display effects. 177 // Called when all data has been saved. Only has display effects.
178 void OnAllDataSaved(int64 size); 178 void OnAllDataSaved(int64 size);
179 179
180 // Called when the downloaded file is removed. 180 // Called when the downloaded file is removed.
181 void OnDownloadedFileRemoved(); 181 void OnDownloadedFileRemoved();
182 182
183 // Download operation had an error. 183 // Download operation had an error.
184 // |size| is the amount of data received so far, and |os_error| is the error 184 // |size| is the amount of data received at interruption.
185 // code that the operation received. 185 // |error| is the network error code that the operation received.
186 void Interrupted(int64 size, int os_error); 186 void Interrupted(int64 size, int error);
187 187
188 // Deletes the file from disk and removes the download from the views and 188 // Deletes the file from disk and removes the download from the views and
189 // history. |user| should be true if this is the result of the user clicking 189 // history. |user| should be true if this is the result of the user clicking
190 // the discard button, and false if it is being deleted for other reasons like 190 // the discard button, and false if it is being deleted for other reasons like
191 // browser shutdown. 191 // browser shutdown.
192 void Delete(DeleteReason reason); 192 void Delete(DeleteReason reason);
193 193
194 // Removes the download from the views and history. 194 // Removes the download from the views and history.
195 void Remove(); 195 void Remove();
196 196
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 // only. 475 // only.
476 bool open_enabled_; 476 bool open_enabled_;
477 477
478 // Did the delegate delay calling Complete on this download? 478 // Did the delegate delay calling Complete on this download?
479 bool delegate_delayed_complete_; 479 bool delegate_delayed_complete_;
480 480
481 DISALLOW_COPY_AND_ASSIGN(DownloadItem); 481 DISALLOW_COPY_AND_ASSIGN(DownloadItem);
482 }; 482 };
483 483
484 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ 484 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_file_unittest.cc ('k') | content/browser/download/download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698