| 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 16 matching lines...) Expand all Loading... |
| 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, |
| 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 false); |
| 38 } | 39 } |
| 39 | 40 |
| 40 bool DownloadItemImplDelegate::ShouldCompleteDownload( | 41 bool DownloadItemImplDelegate::ShouldCompleteDownload( |
| 41 DownloadItemImpl* download, | 42 DownloadItemImpl* download, |
| 42 const base::Closure& complete_callback) { | 43 const base::Closure& complete_callback) { |
| 43 return true; | 44 return true; |
| 44 } | 45 } |
| 45 | 46 |
| 46 bool DownloadItemImplDelegate::ShouldOpenDownload( | 47 bool DownloadItemImplDelegate::ShouldOpenDownload( |
| 47 DownloadItemImpl* download, const ShouldOpenDownloadCallback& callback) { | 48 DownloadItemImpl* download, const ShouldOpenDownloadCallback& callback) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 69 | 70 |
| 70 void DownloadItemImplDelegate::ShowDownloadInShell(DownloadItemImpl* download) { | 71 void DownloadItemImplDelegate::ShowDownloadInShell(DownloadItemImpl* download) { |
| 71 } | 72 } |
| 72 | 73 |
| 73 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {} | 74 void DownloadItemImplDelegate::DownloadRemoved(DownloadItemImpl* download) {} |
| 74 | 75 |
| 75 void DownloadItemImplDelegate::AssertStateConsistent( | 76 void DownloadItemImplDelegate::AssertStateConsistent( |
| 76 DownloadItemImpl* download) const {} | 77 DownloadItemImpl* download) const {} |
| 77 | 78 |
| 78 } // namespace content | 79 } // namespace content |
| OLD | NEW |