OLD | NEW |
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 virtual void SetPathUniquifier(int uniquifier) = 0; | 231 virtual void SetPathUniquifier(int uniquifier) = 0; |
232 virtual const GURL& GetURL() const = 0; | 232 virtual const GURL& GetURL() const = 0; |
233 virtual const std::vector<GURL>& GetUrlChain() const = 0; | 233 virtual const std::vector<GURL>& GetUrlChain() const = 0; |
234 virtual const GURL& GetOriginalUrl() const = 0; | 234 virtual const GURL& GetOriginalUrl() const = 0; |
235 virtual const GURL& GetReferrerUrl() const = 0; | 235 virtual const GURL& GetReferrerUrl() const = 0; |
236 virtual std::string GetSuggestedFilename() const = 0; | 236 virtual std::string GetSuggestedFilename() const = 0; |
237 virtual std::string GetContentDisposition() const = 0; | 237 virtual std::string GetContentDisposition() const = 0; |
238 virtual std::string GetMimeType() const = 0; | 238 virtual std::string GetMimeType() const = 0; |
239 virtual std::string GetOriginalMimeType() const = 0; | 239 virtual std::string GetOriginalMimeType() const = 0; |
240 virtual std::string GetReferrerCharset() const = 0; | 240 virtual std::string GetReferrerCharset() const = 0; |
| 241 virtual std::string GetRemoteAddress() const = 0; |
241 virtual int64 GetTotalBytes() const = 0; | 242 virtual int64 GetTotalBytes() const = 0; |
242 virtual void SetTotalBytes(int64 total_bytes) = 0; | 243 virtual void SetTotalBytes(int64 total_bytes) = 0; |
243 virtual int64 GetReceivedBytes() const = 0; | 244 virtual int64 GetReceivedBytes() const = 0; |
244 virtual int32 GetId() const = 0; | 245 virtual int32 GetId() const = 0; |
245 virtual DownloadId GetGlobalId() const = 0; | 246 virtual DownloadId GetGlobalId() const = 0; |
246 virtual base::Time GetStartTime() const = 0; | 247 virtual base::Time GetStartTime() const = 0; |
247 virtual base::Time GetEndTime() const = 0; | 248 virtual base::Time GetEndTime() const = 0; |
248 virtual void SetDbHandle(int64 handle) = 0; | 249 virtual void SetDbHandle(int64 handle) = 0; |
249 virtual int64 GetDbHandle() const = 0; | 250 virtual int64 GetDbHandle() const = 0; |
250 virtual DownloadManager* GetDownloadManager() = 0; | 251 virtual DownloadManager* GetDownloadManager() = 0; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // DownloadManager::FileSelectionCancelled() without doing some | 297 // DownloadManager::FileSelectionCancelled() without doing some |
297 // rewrites of the DownloadManager queues. | 298 // rewrites of the DownloadManager queues. |
298 virtual void OffThreadCancel(DownloadFileManager* file_manager) = 0; | 299 virtual void OffThreadCancel(DownloadFileManager* file_manager) = 0; |
299 | 300 |
300 virtual std::string DebugString(bool verbose) const = 0; | 301 virtual std::string DebugString(bool verbose) const = 0; |
301 | 302 |
302 virtual void MockDownloadOpenForTesting() = 0; | 303 virtual void MockDownloadOpenForTesting() = 0; |
303 }; | 304 }; |
304 | 305 |
305 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ | 306 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ |
OLD | NEW |