| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 bool calculate_hash, | 42 bool calculate_hash, |
| 43 scoped_ptr<ByteStreamReader> stream, | 43 scoped_ptr<ByteStreamReader> stream, |
| 44 const net::BoundNetLog& bound_net_log, | 44 const net::BoundNetLog& bound_net_log, |
| 45 scoped_ptr<PowerSaveBlocker> power_save_blocker, | 45 scoped_ptr<PowerSaveBlocker> power_save_blocker, |
| 46 base::WeakPtr<DownloadDestinationObserver> observer); | 46 base::WeakPtr<DownloadDestinationObserver> observer); |
| 47 | 47 |
| 48 virtual ~DownloadFileImpl(); | 48 virtual ~DownloadFileImpl(); |
| 49 | 49 |
| 50 // DownloadFile functions. | 50 // DownloadFile functions. |
| 51 virtual void Initialize(const InitializeCallback& callback) OVERRIDE; | 51 virtual void Initialize(const InitializeCallback& callback) OVERRIDE; |
| 52 virtual void Rename(const FilePath& full_path, | 52 virtual void RenameAndUniquify( |
| 53 bool overwrite_existing_file, | 53 const FilePath& full_path, |
| 54 const RenameCompletionCallback& callback) OVERRIDE; | 54 const RenameCompletionCallback& callback) OVERRIDE; |
| 55 virtual void Detach(const DetachCompletionCallback& callback) OVERRIDE; | 55 virtual void RenameAndAnnotate( |
| 56 const FilePath& full_path, |
| 57 const RenameCompletionCallback& callback) OVERRIDE; |
| 58 virtual void Detach() OVERRIDE; |
| 56 virtual void Cancel() OVERRIDE; | 59 virtual void Cancel() OVERRIDE; |
| 57 virtual FilePath FullPath() const OVERRIDE; | 60 virtual FilePath FullPath() const OVERRIDE; |
| 58 virtual bool InProgress() const OVERRIDE; | 61 virtual bool InProgress() const OVERRIDE; |
| 59 virtual int64 BytesSoFar() const OVERRIDE; | 62 virtual int64 BytesSoFar() const OVERRIDE; |
| 60 virtual int64 CurrentSpeed() const OVERRIDE; | 63 virtual int64 CurrentSpeed() const OVERRIDE; |
| 61 virtual bool GetHash(std::string* hash) OVERRIDE; | 64 virtual bool GetHash(std::string* hash) OVERRIDE; |
| 62 virtual std::string GetHashState() OVERRIDE; | 65 virtual std::string GetHashState() OVERRIDE; |
| 63 | 66 |
| 64 protected: | 67 protected: |
| 65 // For test class overrides. | 68 // For test class overrides. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 105 |
| 103 // RAII handle to keep the system from sleeping while we're downloading. | 106 // RAII handle to keep the system from sleeping while we're downloading. |
| 104 scoped_ptr<PowerSaveBlocker> power_save_blocker_; | 107 scoped_ptr<PowerSaveBlocker> power_save_blocker_; |
| 105 | 108 |
| 106 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 109 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 107 }; | 110 }; |
| 108 | 111 |
| 109 } // namespace content | 112 } // namespace content |
| 110 | 113 |
| 111 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 114 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |