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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 305 |
306 // Called when the target path has been determined. |target_path| is the | 306 // Called when the target path has been determined. |target_path| is the |
307 // suggested target path. |disposition| indicates how the target path should | 307 // suggested target path. |disposition| indicates how the target path should |
308 // be used (see TargetDisposition). |danger_type| is the danger level of | 308 // be used (see TargetDisposition). |danger_type| is the danger level of |
309 // |target_path| as determined by the caller. |intermediate_path| is the path | 309 // |target_path| as determined by the caller. |intermediate_path| is the path |
310 // to use to store the download until OnDownloadCompleting() is called. | 310 // to use to store the download until OnDownloadCompleting() is called. |
311 virtual void OnDownloadTargetDetermined( | 311 virtual void OnDownloadTargetDetermined( |
312 const base::FilePath& target_path, | 312 const base::FilePath& target_path, |
313 TargetDisposition disposition, | 313 TargetDisposition disposition, |
314 DownloadDangerType danger_type, | 314 DownloadDangerType danger_type, |
315 const base::FilePath& intermediate_path); | 315 const base::FilePath& intermediate_path, |
| 316 bool hide_file_extension); |
316 | 317 |
317 // Callback from file thread when we initialize the DownloadFile. | 318 // Callback from file thread when we initialize the DownloadFile. |
318 void OnDownloadFileInitialized(DownloadInterruptReason result); | 319 void OnDownloadFileInitialized(DownloadInterruptReason result); |
319 | 320 |
320 void OnDownloadRenamedToIntermediateName( | 321 void OnDownloadRenamedToIntermediateName( |
321 DownloadInterruptReason reason, const base::FilePath& full_path); | 322 DownloadInterruptReason reason, const base::FilePath& full_path); |
322 | 323 |
323 // If all pre-requisites have been met, complete download processing, i.e. do | 324 // If all pre-requisites have been met, complete download processing, i.e. do |
324 // internal cleanup, file rename, and potentially auto-open. (Dangerous | 325 // internal cleanup, file rename, and potentially auto-open. (Dangerous |
325 // downloads still may block on user acceptance after this point.) | 326 // downloads still may block on user acceptance after this point.) |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 const net::BoundNetLog bound_net_log_; | 552 const net::BoundNetLog bound_net_log_; |
552 | 553 |
553 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 554 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
554 | 555 |
555 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 556 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
556 }; | 557 }; |
557 | 558 |
558 } // namespace content | 559 } // namespace content |
559 | 560 |
560 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 561 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
OLD | NEW |