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_ITEM_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 void TransitionTo(DownloadState new_state); | 247 void TransitionTo(DownloadState new_state); |
248 | 248 |
249 // Set the |danger_type_| and invoke obserers if necessary. | 249 // Set the |danger_type_| and invoke obserers if necessary. |
250 void SetDangerType(content::DownloadDangerType danger_type); | 250 void SetDangerType(content::DownloadDangerType danger_type); |
251 | 251 |
252 // Set the |current_path_| to |new_path|. | 252 // Set the |current_path_| to |new_path|. |
253 void SetFullPath(const FilePath& new_path); | 253 void SetFullPath(const FilePath& new_path); |
254 | 254 |
255 // Callback invoked when the download has been renamed to its final name. | 255 // Callback invoked when the download has been renamed to its final name. |
256 void OnDownloadRenamedToFinalName(DownloadFileManager* file_manager, | 256 void OnDownloadRenamedToFinalName(DownloadFileManager* file_manager, |
| 257 content::DownloadInterruptReason reason, |
257 const FilePath& full_path); | 258 const FilePath& full_path); |
258 | 259 |
259 // Callback invoked when the download has been renamed to its intermediate | 260 // Callback invoked when the download has been renamed to its intermediate |
260 // name. | 261 // name. |
261 void OnDownloadRenamedToIntermediateName(const FilePath& full_path); | 262 void OnDownloadRenamedToIntermediateName( |
| 263 content::DownloadInterruptReason reason, const FilePath& full_path); |
262 | 264 |
263 // Callback from file thread when we release the DownloadFile. | 265 // Callback from file thread when we release the DownloadFile. |
264 void OnDownloadFileReleased(); | 266 void OnDownloadFileReleased(); |
265 | 267 |
266 // The handle to the request information. Used for operations outside the | 268 // The handle to the request information. Used for operations outside the |
267 // download system. | 269 // download system. |
268 scoped_ptr<DownloadRequestHandleInterface> request_handle_; | 270 scoped_ptr<DownloadRequestHandleInterface> request_handle_; |
269 | 271 |
270 // Download ID assigned by DownloadResourceHandler. | 272 // Download ID assigned by DownloadResourceHandler. |
271 content::DownloadId download_id_; | 273 content::DownloadId download_id_; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 429 |
428 // Net log to use for this download. | 430 // Net log to use for this download. |
429 const net::BoundNetLog bound_net_log_; | 431 const net::BoundNetLog bound_net_log_; |
430 | 432 |
431 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 433 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
432 | 434 |
433 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 435 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
434 }; | 436 }; |
435 | 437 |
436 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 438 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
OLD | NEW |