OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/mock_download_manager_delegate.h" | 5 #include "content/browser/download/mock_download_manager_delegate.h" |
6 #include "content/browser/download/download_item.h" | 6 #include "content/browser/download/download_item.h" |
7 #include "content/browser/download/download_manager.h" | 7 #include "content/browser/download/download_manager.h" |
8 | 8 |
9 MockDownloadManagerDelegate::MockDownloadManagerDelegate() { | 9 MockDownloadManagerDelegate::MockDownloadManagerDelegate() { |
10 } | 10 } |
(...skipping 27 matching lines...) Expand all Loading... |
38 TabContents* MockDownloadManagerDelegate:: | 38 TabContents* MockDownloadManagerDelegate:: |
39 GetAlternativeTabContentsToNotifyForDownload() { | 39 GetAlternativeTabContentsToNotifyForDownload() { |
40 return NULL; | 40 return NULL; |
41 } | 41 } |
42 | 42 |
43 bool MockDownloadManagerDelegate::ShouldOpenFileBasedOnExtension( | 43 bool MockDownloadManagerDelegate::ShouldOpenFileBasedOnExtension( |
44 const FilePath& path) { | 44 const FilePath& path) { |
45 return false; | 45 return false; |
46 } | 46 } |
47 | 47 |
| 48 bool MockDownloadManagerDelegate::ShouldCompleteDownload(DownloadItem* item) { |
| 49 return true; |
| 50 } |
| 51 |
48 bool MockDownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { | 52 bool MockDownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { |
49 return true; | 53 return true; |
50 } | 54 } |
51 | 55 |
52 bool MockDownloadManagerDelegate::ShouldCompleteDownload(DownloadItem* item) { | |
53 return true; | |
54 } | |
55 | |
56 bool MockDownloadManagerDelegate::GenerateFileHash() { | 56 bool MockDownloadManagerDelegate::GenerateFileHash() { |
57 return false; | 57 return false; |
58 } | 58 } |
59 | 59 |
60 void MockDownloadManagerDelegate::OnResponseCompleted(DownloadItem* item, | 60 void MockDownloadManagerDelegate::OnResponseCompleted(DownloadItem* item, |
61 const std::string& hash) { | 61 const std::string& hash) { |
62 } | 62 } |
63 | 63 |
64 void MockDownloadManagerDelegate::AddItemToPersistentStore(DownloadItem* item) { | 64 void MockDownloadManagerDelegate::AddItemToPersistentStore(DownloadItem* item) { |
65 download_manager_->OnItemAddedToPersistentStore(item->id(), item->id()); | 65 download_manager_->OnItemAddedToPersistentStore(item->id(), item->id()); |
(...skipping 24 matching lines...) Expand all Loading... |
90 } | 90 } |
91 | 91 |
92 void MockDownloadManagerDelegate::ChooseSavePath( | 92 void MockDownloadManagerDelegate::ChooseSavePath( |
93 const base::WeakPtr<SavePackage>& save_package, | 93 const base::WeakPtr<SavePackage>& save_package, |
94 const FilePath& suggested_path, | 94 const FilePath& suggested_path, |
95 bool can_save_as_complete) { | 95 bool can_save_as_complete) { |
96 } | 96 } |
97 | 97 |
98 void MockDownloadManagerDelegate::DownloadProgressUpdated() { | 98 void MockDownloadManagerDelegate::DownloadProgressUpdated() { |
99 } | 99 } |
OLD | NEW |