| 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_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 const GURL& source_url, | 68 const GURL& source_url, |
| 69 const GURL& referrer_url, | 69 const GURL& referrer_url, |
| 70 const RenameCompletionCallback& callback) = 0; | 70 const RenameCompletionCallback& callback) = 0; |
| 71 | 71 |
| 72 // Detach the file so it is not deleted on destruction. | 72 // Detach the file so it is not deleted on destruction. |
| 73 virtual void Detach() = 0; | 73 virtual void Detach() = 0; |
| 74 | 74 |
| 75 // Abort the download and automatically close the file. | 75 // Abort the download and automatically close the file. |
| 76 virtual void Cancel() = 0; | 76 virtual void Cancel() = 0; |
| 77 | 77 |
| 78 // Sets the potential file length. This is called when a half-open range |
| 79 // request fails or completes successfully. If the range request fails, the |
| 80 // file length should not be larger than the request's offset. If the range |
| 81 // request completes successfully, the file length can be determined by |
| 82 // the request offset and the bytes received. So |length| may not be the |
| 83 // actual file length, but it should not be smaller than it. |
| 84 virtual void SetPotentialFileLength(int64_t length) = 0; |
| 85 |
| 78 virtual const base::FilePath& FullPath() const = 0; | 86 virtual const base::FilePath& FullPath() const = 0; |
| 79 virtual bool InProgress() const = 0; | 87 virtual bool InProgress() const = 0; |
| 80 virtual void WasPaused() = 0; | 88 virtual void WasPaused() = 0; |
| 81 }; | 89 }; |
| 82 | 90 |
| 83 } // namespace content | 91 } // namespace content |
| 84 | 92 |
| 85 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ | 93 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_ |
| OLD | NEW |