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