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 19 matching lines...) Expand all Loading... |
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 FilePath target_path(download->GetForcedFilePath()); | 33 FilePath target_path(download->GetForcedFilePath()); |
34 callback.Run(target_path, | 34 callback.Run(target_path, |
35 DownloadItem::TARGET_DISPOSITION_OVERWRITE, | 35 DownloadItem::TARGET_DISPOSITION_OVERWRITE, |
36 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, | 36 DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, |
37 target_path); | 37 target_path); |
38 } | 38 } |
39 | 39 |
40 void DownloadItemImplDelegate::ReadyForDownloadCompletion( | 40 bool DownloadItemImplDelegate::ShouldCompleteDownload( |
41 DownloadItemImpl* download, | 41 DownloadItemImpl* download, |
42 const base::Closure& complete_callback) { | 42 const base::Closure& complete_callback) { |
43 complete_callback.Run(); | 43 return true; |
44 } | 44 } |
45 | 45 |
46 bool DownloadItemImplDelegate::ShouldOpenDownload( | 46 bool DownloadItemImplDelegate::ShouldOpenDownload( |
47 DownloadItemImpl* download, const ShouldOpenDownloadCallback& callback) { | 47 DownloadItemImpl* download, const ShouldOpenDownloadCallback& callback) { |
48 return false; | 48 return false; |
49 } | 49 } |
50 | 50 |
51 bool DownloadItemImplDelegate::ShouldOpenFileBasedOnExtension( | 51 bool DownloadItemImplDelegate::ShouldOpenFileBasedOnExtension( |
52 const FilePath& path) { | 52 const FilePath& path) { |
53 return false; | 53 return false; |
(...skipping 12 matching lines...) Expand all Loading... |
66 | 66 |
67 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {} | 67 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {} |
68 | 68 |
69 void DownloadItemImplDelegate::ShowDownloadInBrowser( | 69 void DownloadItemImplDelegate::ShowDownloadInBrowser( |
70 DownloadItemImpl* download) {} | 70 DownloadItemImpl* download) {} |
71 | 71 |
72 void DownloadItemImplDelegate::AssertStateConsistent( | 72 void DownloadItemImplDelegate::AssertStateConsistent( |
73 DownloadItemImpl* download) const {} | 73 DownloadItemImpl* download) const {} |
74 | 74 |
75 } // namespace content | 75 } // namespace content |
OLD | NEW |