| 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_BASE_FILE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 // Detach the file so it is not deleted on destruction. | 69 // Detach the file so it is not deleted on destruction. |
| 70 virtual void Detach(); | 70 virtual void Detach(); |
| 71 | 71 |
| 72 // Abort the download and automatically close the file. | 72 // Abort the download and automatically close the file. |
| 73 void Cancel(); | 73 void Cancel(); |
| 74 | 74 |
| 75 // Indicate that the download has finished. No new data will be received. | 75 // Indicate that the download has finished. No new data will be received. |
| 76 void Finish(); | 76 void Finish(); |
| 77 | 77 |
| 78 // Indicate that the download is being aborted due to an error. This is |
| 79 // identical to Finish() with the exception that the hash state will not be |
| 80 // finalized. |
| 81 void FinishWithError(); |
| 82 |
| 78 // Set the client guid which will be used to identify the app to the | 83 // Set the client guid which will be used to identify the app to the |
| 79 // system AV scanning function. Should be called before | 84 // system AV scanning function. Should be called before |
| 80 // AnnotateWithSourceInformation() to take effect. | 85 // AnnotateWithSourceInformation() to take effect. |
| 81 void SetClientGuid(const std::string& guid); | 86 void SetClientGuid(const std::string& guid); |
| 82 | 87 |
| 83 // Informs the OS that this file came from the internet. Returns a | 88 // Informs the OS that this file came from the internet. Returns a |
| 84 // DownloadInterruptReason indicating the result of the operation. | 89 // DownloadInterruptReason indicating the result of the operation. |
| 85 // Note: SetClientGuid() should be called before this function on | 90 // Note: SetClientGuid() should be called before this function on |
| 86 // Windows to ensure the correct app client ID is available. | 91 // Windows to ensure the correct app client ID is available. |
| 87 DownloadInterruptReason AnnotateWithSourceInformation(); | 92 DownloadInterruptReason AnnotateWithSourceInformation(); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 bool detached_; | 189 bool detached_; |
| 185 | 190 |
| 186 net::BoundNetLog bound_net_log_; | 191 net::BoundNetLog bound_net_log_; |
| 187 | 192 |
| 188 DISALLOW_COPY_AND_ASSIGN(BaseFile); | 193 DISALLOW_COPY_AND_ASSIGN(BaseFile); |
| 189 }; | 194 }; |
| 190 | 195 |
| 191 } // namespace content | 196 } // namespace content |
| 192 | 197 |
| 193 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ | 198 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ |
| OLD | NEW |