Index: content/browser/download/download_item_impl_delegate.cc |
diff --git a/content/browser/download/download_item_impl_delegate.cc b/content/browser/download/download_item_impl_delegate.cc |
index 4a889f77d24e5dc68b198fa70e16b162aeb9bd38..fb0f4f7da113f8d8e126dc0629fbd161777ebb26 100644 |
--- a/content/browser/download/download_item_impl_delegate.cc |
+++ b/content/browser/download/download_item_impl_delegate.cc |
@@ -2,10 +2,10 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "base/logging.h" |
#include "content/browser/download/download_item_impl_delegate.h" |
-class DownloadItemImpl; |
+#include "base/logging.h" |
+#include "content/browser/download/download_item_impl.h" |
// Infrastructure in DownloadItemImplDelegate to assert invariant that |
// delegate always outlives all attached DownloadItemImpls. |
@@ -25,15 +25,25 @@ void DownloadItemImplDelegate::Detach() { |
--count_; |
} |
-bool DownloadItemImplDelegate::ShouldOpenFileBasedOnExtension( |
- const FilePath& path) { |
- return false; |
+void DownloadItemImplDelegate::DetermineDownloadTarget( |
+ DownloadItemImpl* download, DownloadTargetCallback callback) { |
asanka
2012/09/28 20:22:42
Why is this a concrete class?
Randy Smith (Not in Mondays)
2012/10/09 20:20:19
As per offline conversation: The chrome/content de
|
+ // TODO(rdsmith/asanka): Do something useful if forced file path is null. |
+ FilePath target_path(download->GetForcedFilePath()); |
+ callback.Run(target_path, |
+ content::DownloadItem::TARGET_DISPOSITION_OVERWRITE, |
+ content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, |
+ target_path); |
} |
bool DownloadItemImplDelegate::ShouldOpenDownload(DownloadItemImpl* download) { |
return false; |
} |
+bool DownloadItemImplDelegate::ShouldOpenFileBasedOnExtension( |
+ const FilePath& path) { |
+ return false; |
+} |
+ |
void DownloadItemImplDelegate::CheckForFileRemoval( |
DownloadItemImpl* download_item) {} |