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

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

Issue 8060042: Add downloads.onCreated apitest and fix a few bugs (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: listenOnce, safe_fast_url Created 9 years, 2 months 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"
7 #include "content/browser/download/download_manager.h"
8
9 MockDownloadManagerDelegate::MockDownloadManagerDelegate() {
10 }
6 11
7 MockDownloadManagerDelegate::~MockDownloadManagerDelegate() { 12 MockDownloadManagerDelegate::~MockDownloadManagerDelegate() {
8 } 13 }
9 14
15 void MockDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) {
16 download_manager_ = dm;
17 }
18
10 void MockDownloadManagerDelegate::Shutdown() { 19 void MockDownloadManagerDelegate::Shutdown() {
11 } 20 }
12 21
13 bool MockDownloadManagerDelegate::ShouldStartDownload(int32 download_id) { 22 bool MockDownloadManagerDelegate::ShouldStartDownload(int32 download_id) {
14 return true; 23 return true;
15 } 24 }
16 25
17 void MockDownloadManagerDelegate::ChooseDownloadPath( 26 void MockDownloadManagerDelegate::ChooseDownloadPath(
18 TabContents* tab_contents, 27 TabContents* tab_contents,
19 const FilePath& suggested_path, 28 const FilePath& suggested_path,
(...skipping 26 matching lines...) Expand all
46 55
47 bool MockDownloadManagerDelegate::GenerateFileHash() { 56 bool MockDownloadManagerDelegate::GenerateFileHash() {
48 return false; 57 return false;
49 } 58 }
50 59
51 void MockDownloadManagerDelegate::OnResponseCompleted(DownloadItem* item, 60 void MockDownloadManagerDelegate::OnResponseCompleted(DownloadItem* item,
52 const std::string& hash) { 61 const std::string& hash) {
53 } 62 }
54 63
55 void MockDownloadManagerDelegate::AddItemToPersistentStore(DownloadItem* item) { 64 void MockDownloadManagerDelegate::AddItemToPersistentStore(DownloadItem* item) {
65 download_manager_->OnItemAddedToPersistentStore(item->id(), item->id());
56 } 66 }
57 67
58 void MockDownloadManagerDelegate::UpdateItemInPersistentStore( 68 void MockDownloadManagerDelegate::UpdateItemInPersistentStore(
59 DownloadItem* item) { 69 DownloadItem* item) {
60 } 70 }
61 71
62 void MockDownloadManagerDelegate::UpdatePathForItemInPersistentStore( 72 void MockDownloadManagerDelegate::UpdatePathForItemInPersistentStore(
63 DownloadItem* item, 73 DownloadItem* item,
64 const FilePath& new_path) { 74 const FilePath& new_path) {
65 } 75 }
(...skipping 14 matching lines...) Expand all
80 } 90 }
81 91
82 void MockDownloadManagerDelegate::ChooseSavePath( 92 void MockDownloadManagerDelegate::ChooseSavePath(
83 const base::WeakPtr<SavePackage>& save_package, 93 const base::WeakPtr<SavePackage>& save_package,
84 const FilePath& suggested_path, 94 const FilePath& suggested_path,
85 bool can_save_as_complete) { 95 bool can_save_as_complete) {
86 } 96 }
87 97
88 void MockDownloadManagerDelegate::DownloadProgressUpdated() { 98 void MockDownloadManagerDelegate::DownloadProgressUpdated() {
89 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698