| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 const std::string& hash_state) OVERRIDE; | 124 const std::string& hash_state) OVERRIDE; |
| 125 virtual void Cancel(bool user_cancel) OVERRIDE; | 125 virtual void Cancel(bool user_cancel) OVERRIDE; |
| 126 virtual void MarkAsComplete() OVERRIDE; | 126 virtual void MarkAsComplete() OVERRIDE; |
| 127 virtual void DelayedDownloadOpened() OVERRIDE; | 127 virtual void DelayedDownloadOpened() OVERRIDE; |
| 128 virtual void OnAllDataSaved( | 128 virtual void OnAllDataSaved( |
| 129 int64 size, const std::string& final_hash) OVERRIDE; | 129 int64 size, const std::string& final_hash) OVERRIDE; |
| 130 virtual void OnDownloadedFileRemoved() OVERRIDE; | 130 virtual void OnDownloadedFileRemoved() OVERRIDE; |
| 131 virtual void MaybeCompleteDownload() OVERRIDE; | 131 virtual void MaybeCompleteDownload() OVERRIDE; |
| 132 virtual void Interrupted(int64 size, | 132 virtual void Interrupted(int64 size, |
| 133 const std::string& hash_state, | 133 const std::string& hash_state, |
| 134 InterruptReason reason) OVERRIDE; | 134 content::DownloadInterruptReason reason) OVERRIDE; |
| 135 virtual void Delete(DeleteReason reason) OVERRIDE; | 135 virtual void Delete(DeleteReason reason) OVERRIDE; |
| 136 virtual void Remove() OVERRIDE; | 136 virtual void Remove() OVERRIDE; |
| 137 virtual bool TimeRemaining(base::TimeDelta* remaining) const OVERRIDE; | 137 virtual bool TimeRemaining(base::TimeDelta* remaining) const OVERRIDE; |
| 138 virtual int64 CurrentSpeed() const OVERRIDE; | 138 virtual int64 CurrentSpeed() const OVERRIDE; |
| 139 virtual int PercentComplete() const OVERRIDE; | 139 virtual int PercentComplete() const OVERRIDE; |
| 140 virtual void OnPathDetermined(const FilePath& path) OVERRIDE; | 140 virtual void OnPathDetermined(const FilePath& path) OVERRIDE; |
| 141 virtual bool AllDataSaved() const OVERRIDE; | 141 virtual bool AllDataSaved() const OVERRIDE; |
| 142 virtual void SetFileCheckResults(const DownloadStateInfo& state) OVERRIDE; | 142 virtual void SetFileCheckResults(const DownloadStateInfo& state) OVERRIDE; |
| 143 virtual void Rename(const FilePath& full_path) OVERRIDE; | 143 virtual void Rename(const FilePath& full_path) OVERRIDE; |
| 144 virtual void TogglePause() OVERRIDE; | 144 virtual void TogglePause() OVERRIDE; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 virtual bool GetAutoOpened() OVERRIDE; | 187 virtual bool GetAutoOpened() OVERRIDE; |
| 188 virtual const FilePath& GetTargetName() const OVERRIDE; | 188 virtual const FilePath& GetTargetName() const OVERRIDE; |
| 189 virtual bool PromptUserForSaveLocation() const OVERRIDE; | 189 virtual bool PromptUserForSaveLocation() const OVERRIDE; |
| 190 virtual bool IsOtr() const OVERRIDE; | 190 virtual bool IsOtr() const OVERRIDE; |
| 191 virtual const FilePath& GetSuggestedPath() const OVERRIDE; | 191 virtual const FilePath& GetSuggestedPath() const OVERRIDE; |
| 192 virtual bool IsTemporary() const OVERRIDE; | 192 virtual bool IsTemporary() const OVERRIDE; |
| 193 virtual void SetOpened(bool opened) OVERRIDE; | 193 virtual void SetOpened(bool opened) OVERRIDE; |
| 194 virtual bool GetOpened() const OVERRIDE; | 194 virtual bool GetOpened() const OVERRIDE; |
| 195 virtual const std::string& GetLastModifiedTime() const OVERRIDE; | 195 virtual const std::string& GetLastModifiedTime() const OVERRIDE; |
| 196 virtual const std::string& GetETag() const OVERRIDE; | 196 virtual const std::string& GetETag() const OVERRIDE; |
| 197 virtual InterruptReason GetLastReason() const OVERRIDE; | 197 virtual content::DownloadInterruptReason GetLastReason() const OVERRIDE; |
| 198 virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const OVERRIDE; | 198 virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const OVERRIDE; |
| 199 virtual DownloadStateInfo GetStateInfo() const OVERRIDE; | 199 virtual DownloadStateInfo GetStateInfo() const OVERRIDE; |
| 200 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 200 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
| 201 virtual content::WebContents* GetWebContents() const OVERRIDE; | 201 virtual content::WebContents* GetWebContents() const OVERRIDE; |
| 202 virtual FilePath GetTargetFilePath() const OVERRIDE; | 202 virtual FilePath GetTargetFilePath() const OVERRIDE; |
| 203 virtual FilePath GetFileNameToReportUser() const OVERRIDE; | 203 virtual FilePath GetFileNameToReportUser() const OVERRIDE; |
| 204 virtual void SetDisplayName(const FilePath& name) OVERRIDE; | 204 virtual void SetDisplayName(const FilePath& name) OVERRIDE; |
| 205 virtual FilePath GetUserVerifiedFilePath() const OVERRIDE; | 205 virtual FilePath GetUserVerifiedFilePath() const OVERRIDE; |
| 206 virtual bool NeedsRename() const OVERRIDE; | 206 virtual bool NeedsRename() const OVERRIDE; |
| 207 virtual void OffThreadCancel(DownloadFileManager* file_manager) OVERRIDE; | 207 virtual void OffThreadCancel(DownloadFileManager* file_manager) OVERRIDE; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // download is in progress. | 309 // download is in progress. |
| 310 std::string hash_state_; | 310 std::string hash_state_; |
| 311 | 311 |
| 312 // Server's time stamp for the file. | 312 // Server's time stamp for the file. |
| 313 std::string last_modified_time_; | 313 std::string last_modified_time_; |
| 314 | 314 |
| 315 // Server's ETAG for the file. | 315 // Server's ETAG for the file. |
| 316 std::string etag_; | 316 std::string etag_; |
| 317 | 317 |
| 318 // Last reason. | 318 // Last reason. |
| 319 InterruptReason last_reason_; | 319 content::DownloadInterruptReason last_reason_; |
| 320 | 320 |
| 321 // Start time for recording statistics. | 321 // Start time for recording statistics. |
| 322 base::TimeTicks start_tick_; | 322 base::TimeTicks start_tick_; |
| 323 | 323 |
| 324 // The current state of this download. | 324 // The current state of this download. |
| 325 DownloadState state_; | 325 DownloadState state_; |
| 326 | 326 |
| 327 // The views of this item in the download shelf and download tab. | 327 // The views of this item in the download shelf and download tab. |
| 328 ObserverList<Observer> observers_; | 328 ObserverList<Observer> observers_; |
| 329 | 329 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // are owned by the DownloadItemImpl. | 384 // are owned by the DownloadItemImpl. |
| 385 std::map<const void*, ExternalData*> external_data_map_; | 385 std::map<const void*, ExternalData*> external_data_map_; |
| 386 | 386 |
| 387 // Net log to use for this download. | 387 // Net log to use for this download. |
| 388 const net::BoundNetLog bound_net_log_; | 388 const net::BoundNetLog bound_net_log_; |
| 389 | 389 |
| 390 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 390 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 391 }; | 391 }; |
| 392 | 392 |
| 393 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 393 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |