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

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

Issue 14957002: [Resumption 7/11] Add a CanResume() method to DownloadItem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with r200532 Created 7 years, 7 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) 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 virtual int32 GetId() const = 0; 151 virtual int32 GetId() const = 0;
152 virtual DownloadId GetGlobalId() const = 0; 152 virtual DownloadId GetGlobalId() const = 0;
153 virtual DownloadState GetState() const = 0; 153 virtual DownloadState GetState() const = 0;
154 154
155 // Only valid if |GetState() == DownloadItem::INTERRUPTED|. 155 // Only valid if |GetState() == DownloadItem::INTERRUPTED|.
156 virtual DownloadInterruptReason GetLastReason() const = 0; 156 virtual DownloadInterruptReason GetLastReason() const = 0;
157 157
158 virtual bool IsPaused() const = 0; 158 virtual bool IsPaused() const = 0;
159 virtual bool IsTemporary() const = 0; 159 virtual bool IsTemporary() const = 0;
160 160
161 // Returns true if the download can be resumed. A download can be resumed if
162 // an in-progress download was paused or if an interrupted download requires
163 // user-interaction to resume.
164 virtual bool CanResume() const = 0;
165
161 // Convenience routines for accessing GetState() results conceptually ----- 166 // Convenience routines for accessing GetState() results conceptually -----
162 167
163 // Returns true if the download needs more data. 168 // Returns true if the download needs more data.
164 virtual bool IsPartialDownload() const = 0; 169 virtual bool IsPartialDownload() const = 0;
165 170
166 // Returns true if the download is still receiving data. 171 // Returns true if the download is still receiving data.
167 virtual bool IsInProgress() const = 0; 172 virtual bool IsInProgress() const = 0;
168 173
169 // Returns true if the download has been cancelled or was interrupted. 174 // Returns true if the download has been cancelled or was interrupted.
170 virtual bool IsCancelled() const = 0; 175 virtual bool IsCancelled() const = 0;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // return |name|. Has no effect on the final target filename. 325 // return |name|. Has no effect on the final target filename.
321 virtual void SetDisplayName(const base::FilePath& name) = 0; 326 virtual void SetDisplayName(const base::FilePath& name) = 0;
322 327
323 // Debug/testing ------------------------------------------------------------- 328 // Debug/testing -------------------------------------------------------------
324 virtual std::string DebugString(bool verbose) const = 0; 329 virtual std::string DebugString(bool verbose) const = 0;
325 }; 330 };
326 331
327 } // namespace content 332 } // namespace content
328 333
329 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ 334 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/public/test/mock_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698