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

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

Issue 14640020: [Resumption 9/11] Handle filename determination for resumed downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 // Show the download via the OS shell. 146 // Show the download via the OS shell.
147 virtual void ShowDownloadInShell() = 0; 147 virtual void ShowDownloadInShell() = 0;
148 148
149 // State accessors ----------------------------------------------------------- 149 // State accessors -----------------------------------------------------------
150 150
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 // Returns the most recent interrupt reason for this download. Returns
156 // DOWNLOAD_INTERRUPT_REASON_NONE if there is no previous interrupt reason.
157 // Cancelled downloads return DOWNLOAD_INTERRUPT_REASON_USER_CANCELLED. If
158 // the download was resumed, then the return value is the interrupt reason
159 // prior to resumption.
156 virtual DownloadInterruptReason GetLastReason() const = 0; 160 virtual DownloadInterruptReason GetLastReason() const = 0;
157 161
158 virtual bool IsPaused() const = 0; 162 virtual bool IsPaused() const = 0;
159 virtual bool IsTemporary() const = 0; 163 virtual bool IsTemporary() const = 0;
160 164
161 // Returns true if the download can be resumed. A download can be resumed if 165 // 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 166 // an in-progress download was paused or if an interrupted download requires
163 // user-interaction to resume. 167 // user-interaction to resume.
164 virtual bool CanResume() const = 0; 168 virtual bool CanResume() const = 0;
165 169
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // return |name|. Has no effect on the final target filename. 324 // return |name|. Has no effect on the final target filename.
321 virtual void SetDisplayName(const base::FilePath& name) = 0; 325 virtual void SetDisplayName(const base::FilePath& name) = 0;
322 326
323 // Debug/testing ------------------------------------------------------------- 327 // Debug/testing -------------------------------------------------------------
324 virtual std::string DebugString(bool verbose) const = 0; 328 virtual std::string DebugString(bool verbose) const = 0;
325 }; 329 };
326 330
327 } // namespace content 331 } // namespace content
328 332
329 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ 333 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698