Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: content/browser/download/mock_download_manager_delegate.cc

Issue 8414007: Rearrange Should*Download delegate calls to be more useful and intuitive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to TOT. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « content/browser/download/mock_download_manager_delegate.h ('k') | content/public/browser/download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698