| OLD | NEW |
| 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/byte_stream.h" | 7 #include "content/browser/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 { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 received_bytes == rhs.received_bytes && total_bytes == rhs.total_bytes && | 80 received_bytes == rhs.received_bytes && total_bytes == rhs.total_bytes && |
| 81 state == rhs.state && danger_type == rhs.danger_type && | 81 state == rhs.state && danger_type == rhs.danger_type && |
| 82 interrupt_reason == rhs.interrupt_reason && opened == rhs.opened); | 82 interrupt_reason == rhs.interrupt_reason && opened == rhs.opened); |
| 83 } | 83 } |
| 84 | 84 |
| 85 MockDownloadManager::MockDownloadManager() {} | 85 MockDownloadManager::MockDownloadManager() {} |
| 86 | 86 |
| 87 MockDownloadManager::~MockDownloadManager() {} | 87 MockDownloadManager::~MockDownloadManager() {} |
| 88 | 88 |
| 89 void MockDownloadManager::StartDownload( | 89 void MockDownloadManager::StartDownload( |
| 90 scoped_ptr<DownloadCreateInfo> info, | 90 std::unique_ptr<DownloadCreateInfo> info, |
| 91 scoped_ptr<ByteStreamReader> stream, | 91 std::unique_ptr<ByteStreamReader> stream, |
| 92 const DownloadUrlParameters::OnStartedCallback& callback) { | 92 const DownloadUrlParameters::OnStartedCallback& callback) { |
| 93 MockStartDownload(info.get(), stream.get()); | 93 MockStartDownload(info.get(), stream.get()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 DownloadItem* MockDownloadManager::CreateDownloadItem( | 96 DownloadItem* MockDownloadManager::CreateDownloadItem( |
| 97 const std::string& guid, | 97 const std::string& guid, |
| 98 uint32_t id, | 98 uint32_t id, |
| 99 const base::FilePath& current_path, | 99 const base::FilePath& current_path, |
| 100 const base::FilePath& target_path, | 100 const base::FilePath& target_path, |
| 101 const std::vector<GURL>& url_chain, | 101 const std::vector<GURL>& url_chain, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 129 total_bytes, | 129 total_bytes, |
| 130 hash, | 130 hash, |
| 131 state, | 131 state, |
| 132 danger_type, | 132 danger_type, |
| 133 interrupt_reason, | 133 interrupt_reason, |
| 134 opened); | 134 opened); |
| 135 return MockCreateDownloadItem(adapter); | 135 return MockCreateDownloadItem(adapter); |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace content | 138 } // namespace content |
| OLD | NEW |