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

Side by Side Diff: content/public/test/mock_download_manager.cc

Issue 11363222: Persist download interrupt reason, both target and current paths, and url_chain. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed ordering of target_path and current_path everywhere to match that of DownloadItemImpl. Created 8 years 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) 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/public/test/mock_download_manager.h" 5 #include "content/public/test/mock_download_manager.h"
6 6
7 #include "content/browser/download/byte_stream.h" 7 #include "content/browser/download/byte_stream.h"
8 #include "content/browser/download/download_create_info.h" 8 #include "content/browser/download/download_create_info.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 void PrintTo(const DownloadRequestHandle& params, std::ostream* os) { 12 void PrintTo(const DownloadRequestHandle& params, std::ostream* os) {
13 } 13 }
14 14
15 MockDownloadManager::MockDownloadManager() {} 15 MockDownloadManager::MockDownloadManager() {}
16 16
17 MockDownloadManager::~MockDownloadManager() {} 17 MockDownloadManager::~MockDownloadManager() {}
18 18
19 DownloadItem* MockDownloadManager::StartDownload( 19 DownloadItem* MockDownloadManager::StartDownload(
20 scoped_ptr<DownloadCreateInfo> info, 20 scoped_ptr<DownloadCreateInfo> info,
21 scoped_ptr<ByteStreamReader> stream) { 21 scoped_ptr<ByteStreamReader> stream) {
22 return MockStartDownload(info.get(), stream.get()); 22 return MockStartDownload(info.get(), stream.get());
23 } 23 }
24 24
25 DownloadItem* MockDownloadManager::CreateDownloadItem(
26 const FilePath& current_path,
27 const FilePath& target_path,
28 const std::vector<GURL>& url_chain,
29 const GURL& referrer_url,
30 const base::Time& start_time,
31 const base::Time& end_time,
32 int64 received_bytes,
33 int64 total_bytes,
34 DownloadItem::DownloadState state,
35 DownloadInterruptReason interrupt_reason,
36 bool opened) {
37 return MockCreateDownloadItem(
38 target_path, url_chain, referrer_url, start_time, end_time,
39 received_bytes, total_bytes, state, interrupt_reason, opened);
40 }
41
25 } // namespace content 42 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698