| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void RenameAndAnnotate(const base::FilePath& full_path, | 53 void RenameAndAnnotate(const base::FilePath& full_path, |
| 54 const RenameCompletionCallback& callback) override; | 54 const RenameCompletionCallback& callback) override; |
| 55 void Detach() override; | 55 void Detach() override; |
| 56 void Cancel() override; | 56 void Cancel() override; |
| 57 base::FilePath FullPath() const override; | 57 base::FilePath FullPath() const override; |
| 58 bool InProgress() const override; | 58 bool InProgress() const override; |
| 59 int64 CurrentSpeed() const override; | 59 int64 CurrentSpeed() const override; |
| 60 bool GetHash(std::string* hash) override; | 60 bool GetHash(std::string* hash) override; |
| 61 std::string GetHashState() override; | 61 std::string GetHashState() override; |
| 62 void SetClientGuid(const std::string& guid) override; | 62 void SetClientGuid(const std::string& guid) override; |
| 63 void SetHideFileExtension(bool hide_extension) override; |
| 63 | 64 |
| 64 protected: | 65 protected: |
| 65 // For test class overrides. | 66 // For test class overrides. |
| 66 virtual DownloadInterruptReason AppendDataToFile( | 67 virtual DownloadInterruptReason AppendDataToFile( |
| 67 const char* data, size_t data_len); | 68 const char* data, size_t data_len); |
| 68 | 69 |
| 69 virtual base::TimeDelta GetRetryDelayForFailedRename(int attempt_number); | 70 virtual base::TimeDelta GetRetryDelayForFailedRename(int attempt_number); |
| 70 | 71 |
| 71 virtual bool ShouldRetryFailedRename(DownloadInterruptReason reason); | 72 virtual bool ShouldRetryFailedRename(DownloadInterruptReason reason); |
| 72 | 73 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 base::WeakPtr<DownloadDestinationObserver> observer_; | 130 base::WeakPtr<DownloadDestinationObserver> observer_; |
| 130 | 131 |
| 131 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; | 132 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; |
| 132 | 133 |
| 133 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 134 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 } // namespace content | 137 } // namespace content |
| 137 | 138 |
| 138 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 139 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |