| 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_FILE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| 7 | 7 |
| 8 #include "content/browser/download/download_file.h" | 8 #include "content/browser/download/download_file.h" |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 scoped_ptr<PowerSaveBlocker> power_save_blocker, | 46 scoped_ptr<PowerSaveBlocker> power_save_blocker, |
| 47 base::WeakPtr<DownloadDestinationObserver> observer); | 47 base::WeakPtr<DownloadDestinationObserver> observer); |
| 48 | 48 |
| 49 virtual ~DownloadFileImpl(); | 49 virtual ~DownloadFileImpl(); |
| 50 | 50 |
| 51 // DownloadFile functions. | 51 // DownloadFile functions. |
| 52 virtual void Initialize(const InitializeCallback& callback) OVERRIDE; | 52 virtual void Initialize(const InitializeCallback& callback) OVERRIDE; |
| 53 virtual void Rename(const FilePath& full_path, | 53 virtual void Rename(const FilePath& full_path, |
| 54 bool overwrite_existing_file, | 54 bool overwrite_existing_file, |
| 55 const RenameCompletionCallback& callback) OVERRIDE; | 55 const RenameCompletionCallback& callback) OVERRIDE; |
| 56 virtual void Detach(base::Closure callback) OVERRIDE; | 56 virtual void Detach(const DetachCompletionCallback& callback) OVERRIDE; |
| 57 virtual void Cancel() OVERRIDE; | 57 virtual void Cancel() OVERRIDE; |
| 58 virtual void AnnotateWithSourceInformation() OVERRIDE; | |
| 59 virtual FilePath FullPath() const OVERRIDE; | 58 virtual FilePath FullPath() const OVERRIDE; |
| 60 virtual bool InProgress() const OVERRIDE; | 59 virtual bool InProgress() const OVERRIDE; |
| 61 virtual int64 BytesSoFar() const OVERRIDE; | 60 virtual int64 BytesSoFar() const OVERRIDE; |
| 62 virtual int64 CurrentSpeed() const OVERRIDE; | 61 virtual int64 CurrentSpeed() const OVERRIDE; |
| 63 virtual bool GetHash(std::string* hash) OVERRIDE; | 62 virtual bool GetHash(std::string* hash) OVERRIDE; |
| 64 virtual std::string GetHashState() OVERRIDE; | 63 virtual std::string GetHashState() OVERRIDE; |
| 65 | 64 |
| 66 protected: | 65 protected: |
| 67 // For test class overrides. | 66 // For test class overrides. |
| 68 virtual DownloadInterruptReason AppendDataToFile( | 67 virtual DownloadInterruptReason AppendDataToFile( |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 103 |
| 105 // RAII handle to keep the system from sleeping while we're downloading. | 104 // RAII handle to keep the system from sleeping while we're downloading. |
| 106 scoped_ptr<PowerSaveBlocker> power_save_blocker_; | 105 scoped_ptr<PowerSaveBlocker> power_save_blocker_; |
| 107 | 106 |
| 108 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 107 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 109 }; | 108 }; |
| 110 | 109 |
| 111 } // namespace content | 110 } // namespace content |
| 112 | 111 |
| 113 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 112 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |