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 #include "content/browser/download/download_item_impl_delegate.h" | 5 #include "content/browser/download/download_item_impl_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/download/download_item_impl.h" | 8 #include "content/browser/download/download_item_impl.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 void DownloadItemImplDelegate::Detach() { | 25 void DownloadItemImplDelegate::Detach() { |
26 DCHECK_LT(0, count_); | 26 DCHECK_LT(0, count_); |
27 --count_; | 27 --count_; |
28 } | 28 } |
29 | 29 |
30 void DownloadItemImplDelegate::DetermineDownloadTarget( | 30 void DownloadItemImplDelegate::DetermineDownloadTarget( |
31 DownloadItemImpl* download, const DownloadTargetCallback& callback) { | 31 DownloadItemImpl* download, const DownloadTargetCallback& callback) { |
32 // TODO(rdsmith/asanka): Do something useful if forced file path is null. | 32 // TODO(rdsmith/asanka): Do something useful if forced file path is null. |
33 base::FilePath target_path(download->GetForcedFilePath()); | 33 base::FilePath target_path(download->GetForcedFilePath()); |
34 callback.Run(target_path, | 34 callback.Run(target_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE, |
35 DownloadItem::TARGET_DISPOSITION_OVERWRITE, | 35 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, target_path, |
36 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, | 36 DOWNLOAD_INTERRUPT_REASON_NONE); |
37 target_path); | |
38 } | 37 } |
39 | 38 |
40 bool DownloadItemImplDelegate::ShouldCompleteDownload( | 39 bool DownloadItemImplDelegate::ShouldCompleteDownload( |
41 DownloadItemImpl* download, | 40 DownloadItemImpl* download, |
42 const base::Closure& complete_callback) { | 41 const base::Closure& complete_callback) { |
43 return true; | 42 return true; |
44 } | 43 } |
45 | 44 |
46 bool DownloadItemImplDelegate::ShouldOpenDownload( | 45 bool DownloadItemImplDelegate::ShouldOpenDownload( |
47 DownloadItemImpl* download, const ShouldOpenDownloadCallback& callback) { | 46 DownloadItemImpl* download, const ShouldOpenDownloadCallback& callback) { |
(...skipping 27 matching lines...) Expand all Loading... |
75 | 74 |
76 void DownloadItemImplDelegate::ShowDownloadInShell(DownloadItemImpl* download) { | 75 void DownloadItemImplDelegate::ShowDownloadInShell(DownloadItemImpl* download) { |
77 } | 76 } |
78 | 77 |
79 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {} | 78 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {} |
80 | 79 |
81 void DownloadItemImplDelegate::AssertStateConsistent( | 80 void DownloadItemImplDelegate::AssertStateConsistent( |
82 DownloadItemImpl* download) const {} | 81 DownloadItemImpl* download) const {} |
83 | 82 |
84 } // namespace content | 83 } // namespace content |
OLD | NEW |