| 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 // 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 163   virtual DownloadInterruptReason GetLastReason() const = 0; | 163   virtual DownloadInterruptReason GetLastReason() const = 0; | 
| 164 | 164 | 
| 165   virtual bool IsPaused() const = 0; | 165   virtual bool IsPaused() const = 0; | 
| 166   virtual bool IsTemporary() const = 0; | 166   virtual bool IsTemporary() const = 0; | 
| 167 | 167 | 
| 168   // Returns true if the download can be resumed. A download can be resumed if | 168   // Returns true if the download can be resumed. A download can be resumed if | 
| 169   // an in-progress download was paused or if an interrupted download requires | 169   // an in-progress download was paused or if an interrupted download requires | 
| 170   // user-interaction to resume. | 170   // user-interaction to resume. | 
| 171   virtual bool CanResume() const = 0; | 171   virtual bool CanResume() const = 0; | 
| 172 | 172 | 
|  | 173   // Returns true if the download is in a terminal state. This includes | 
|  | 174   // completed downloads, cancelled downloads, and interrupted downloads that | 
|  | 175   // can't be resumed. | 
|  | 176   virtual bool IsDone() const = 0; | 
|  | 177 | 
| 173   //    Convenience routines for accessing GetState() results conceptually ----- | 178   //    Convenience routines for accessing GetState() results conceptually ----- | 
| 174 | 179 | 
| 175   // Returns true if the download needs more data. |  | 
| 176   virtual bool IsPartialDownload() const = 0; |  | 
| 177 |  | 
| 178   // Returns true if the download is still receiving data. | 180   // Returns true if the download is still receiving data. | 
| 179   virtual bool IsInProgress() const = 0; | 181   virtual bool IsInProgress() const = 0; | 
| 180 | 182 | 
| 181   // Returns true if the download has been cancelled or was interrupted. | 183   // Returns true if the download has been cancelled or was interrupted. | 
| 182   virtual bool IsCancelled() const = 0; | 184   virtual bool IsCancelled() const = 0; | 
| 183 | 185 | 
| 184   // Returns true if the download was interrupted. | 186   // Returns true if the download was interrupted. | 
| 185   virtual bool IsInterrupted() const = 0; | 187   virtual bool IsInterrupted() const = 0; | 
| 186 | 188 | 
| 187   // Returns true if we have all the data and know the final file name. | 189   // Returns true if we have all the data and know the final file name. | 
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 327   // return |name|. Has no effect on the final target filename. | 329   // return |name|. Has no effect on the final target filename. | 
| 328   virtual void SetDisplayName(const base::FilePath& name) = 0; | 330   virtual void SetDisplayName(const base::FilePath& name) = 0; | 
| 329 | 331 | 
| 330   // Debug/testing ------------------------------------------------------------- | 332   // Debug/testing ------------------------------------------------------------- | 
| 331   virtual std::string DebugString(bool verbose) const = 0; | 333   virtual std::string DebugString(bool verbose) const = 0; | 
| 332 }; | 334 }; | 
| 333 | 335 | 
| 334 }  // namespace content | 336 }  // namespace content | 
| 335 | 337 | 
| 336 #endif  // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 338 #endif  // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 
| OLD | NEW | 
|---|