| 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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 virtual const std::string& GetETag() const OVERRIDE; | 122 virtual const std::string& GetETag() const OVERRIDE; |
| 123 virtual bool IsSavePackageDownload() const OVERRIDE; | 123 virtual bool IsSavePackageDownload() const OVERRIDE; |
| 124 virtual const base::FilePath& GetFullPath() const OVERRIDE; | 124 virtual const base::FilePath& GetFullPath() const OVERRIDE; |
| 125 virtual const base::FilePath& GetTargetFilePath() const OVERRIDE; | 125 virtual const base::FilePath& GetTargetFilePath() const OVERRIDE; |
| 126 virtual const base::FilePath& GetForcedFilePath() const OVERRIDE; | 126 virtual const base::FilePath& GetForcedFilePath() const OVERRIDE; |
| 127 virtual base::FilePath GetFileNameToReportUser() const OVERRIDE; | 127 virtual base::FilePath GetFileNameToReportUser() const OVERRIDE; |
| 128 virtual TargetDisposition GetTargetDisposition() const OVERRIDE; | 128 virtual TargetDisposition GetTargetDisposition() const OVERRIDE; |
| 129 virtual const std::string& GetHash() const OVERRIDE; | 129 virtual const std::string& GetHash() const OVERRIDE; |
| 130 virtual const std::string& GetHashState() const OVERRIDE; | 130 virtual const std::string& GetHashState() const OVERRIDE; |
| 131 virtual bool GetFileExternallyRemoved() const OVERRIDE; | 131 virtual bool GetFileExternallyRemoved() const OVERRIDE; |
| 132 virtual void DeleteFile() OVERRIDE; | 132 virtual void DeleteFile(const base::Callback<void(bool)>& callback) OVERRIDE; |
| 133 virtual bool IsDangerous() const OVERRIDE; | 133 virtual bool IsDangerous() const OVERRIDE; |
| 134 virtual DownloadDangerType GetDangerType() const OVERRIDE; | 134 virtual DownloadDangerType GetDangerType() const OVERRIDE; |
| 135 virtual bool TimeRemaining(base::TimeDelta* remaining) const OVERRIDE; | 135 virtual bool TimeRemaining(base::TimeDelta* remaining) const OVERRIDE; |
| 136 virtual int64 CurrentSpeed() const OVERRIDE; | 136 virtual int64 CurrentSpeed() const OVERRIDE; |
| 137 virtual int PercentComplete() const OVERRIDE; | 137 virtual int PercentComplete() const OVERRIDE; |
| 138 virtual bool AllDataSaved() const OVERRIDE; | 138 virtual bool AllDataSaved() const OVERRIDE; |
| 139 virtual int64 GetTotalBytes() const OVERRIDE; | 139 virtual int64 GetTotalBytes() const OVERRIDE; |
| 140 virtual int64 GetReceivedBytes() const OVERRIDE; | 140 virtual int64 GetReceivedBytes() const OVERRIDE; |
| 141 virtual base::Time GetStartTime() const OVERRIDE; | 141 virtual base::Time GetStartTime() const OVERRIDE; |
| 142 virtual base::Time GetEndTime() const OVERRIDE; | 142 virtual base::Time GetEndTime() const OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 scoped_ptr<DownloadRequestHandleInterface> req_handle); | 177 scoped_ptr<DownloadRequestHandleInterface> req_handle); |
| 178 | 178 |
| 179 // Needed because of intertwining with DownloadManagerImpl ------------------- | 179 // Needed because of intertwining with DownloadManagerImpl ------------------- |
| 180 | 180 |
| 181 // TODO(rdsmith): Unwind DownloadManagerImpl and DownloadItemImpl, | 181 // TODO(rdsmith): Unwind DownloadManagerImpl and DownloadItemImpl, |
| 182 // removing these from the public interface. | 182 // removing these from the public interface. |
| 183 | 183 |
| 184 // Notify observers that this item is being removed by the user. | 184 // Notify observers that this item is being removed by the user. |
| 185 virtual void NotifyRemoved(); | 185 virtual void NotifyRemoved(); |
| 186 | 186 |
| 187 virtual void OnDownloadedFileRemoved(bool success); | 187 virtual void OnDownloadedFileRemoved(); |
| 188 | 188 |
| 189 // Provide a weak pointer reference to a DownloadDestinationObserver | 189 // Provide a weak pointer reference to a DownloadDestinationObserver |
| 190 // for use by download destinations. | 190 // for use by download destinations. |
| 191 virtual base::WeakPtr<DownloadDestinationObserver> | 191 virtual base::WeakPtr<DownloadDestinationObserver> |
| 192 DestinationObserverAsWeakPtr(); | 192 DestinationObserverAsWeakPtr(); |
| 193 | 193 |
| 194 // Get the download's BoundNetLog. | 194 // Get the download's BoundNetLog. |
| 195 virtual const net::BoundNetLog& GetBoundNetLog() const; | 195 virtual const net::BoundNetLog& GetBoundNetLog() const; |
| 196 | 196 |
| 197 // DownloadItemImpl routines only needed by SavePackage ---------------------- | 197 // DownloadItemImpl routines only needed by SavePackage ---------------------- |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 const net::BoundNetLog bound_net_log_; | 543 const net::BoundNetLog bound_net_log_; |
| 544 | 544 |
| 545 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 545 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 546 | 546 |
| 547 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 547 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 548 }; | 548 }; |
| 549 | 549 |
| 550 } // namespace content | 550 } // namespace content |
| 551 | 551 |
| 552 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 552 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |