| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/fake_download_item.h" | 5 #include "content/public/test/fake_download_item.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 void FakeDownloadItem::SetReceivedBytes(int64_t received_bytes) { | 137 void FakeDownloadItem::SetReceivedBytes(int64_t received_bytes) { |
| 138 received_bytes_ = received_bytes; | 138 received_bytes_ = received_bytes; |
| 139 } | 139 } |
| 140 | 140 |
| 141 int64_t FakeDownloadItem::GetReceivedBytes() const { | 141 int64_t FakeDownloadItem::GetReceivedBytes() const { |
| 142 return received_bytes_; | 142 return received_bytes_; |
| 143 } | 143 } |
| 144 | 144 |
| 145 void FakeDownloadItem::SetLastAccessTime(base::Time time) { |
| 146 last_access_time_ = time; |
| 147 } |
| 148 |
| 149 base::Time FakeDownloadItem::GetLastAccessTime() const { |
| 150 return last_access_time_; |
| 151 } |
| 152 |
| 145 // The methods below are not supported and are not expected to be called. | 153 // The methods below are not supported and are not expected to be called. |
| 146 void FakeDownloadItem::ValidateDangerousDownload() { | 154 void FakeDownloadItem::ValidateDangerousDownload() { |
| 147 NOTREACHED(); | 155 NOTREACHED(); |
| 148 } | 156 } |
| 149 | 157 |
| 150 void FakeDownloadItem::StealDangerousDownload( | 158 void FakeDownloadItem::StealDangerousDownload( |
| 151 bool delete_file_afterward, | 159 bool delete_file_afterward, |
| 152 const AcquireFileCallback& callback) { | 160 const AcquireFileCallback& callback) { |
| 153 NOTREACHED(); | 161 NOTREACHED(); |
| 154 callback.Run(base::FilePath()); | 162 callback.Run(base::FilePath()); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 bool FakeDownloadItem::GetAutoOpened() { | 371 bool FakeDownloadItem::GetAutoOpened() { |
| 364 NOTREACHED(); | 372 NOTREACHED(); |
| 365 return false; | 373 return false; |
| 366 } | 374 } |
| 367 | 375 |
| 368 bool FakeDownloadItem::GetOpened() const { | 376 bool FakeDownloadItem::GetOpened() const { |
| 369 NOTREACHED(); | 377 NOTREACHED(); |
| 370 return false; | 378 return false; |
| 371 } | 379 } |
| 372 | 380 |
| 373 base::Time FakeDownloadItem::GetLastAccessTime() const { | |
| 374 NOTREACHED(); | |
| 375 return base::Time(); | |
| 376 } | |
| 377 | |
| 378 bool FakeDownloadItem::IsTransient() const { | 381 bool FakeDownloadItem::IsTransient() const { |
| 379 NOTREACHED(); | 382 NOTREACHED(); |
| 380 return false; | 383 return false; |
| 381 } | 384 } |
| 382 | 385 |
| 383 BrowserContext* FakeDownloadItem::GetBrowserContext() const { | 386 BrowserContext* FakeDownloadItem::GetBrowserContext() const { |
| 384 NOTREACHED(); | 387 NOTREACHED(); |
| 385 return nullptr; | 388 return nullptr; |
| 386 } | 389 } |
| 387 | 390 |
| 388 WebContents* FakeDownloadItem::GetWebContents() const { | 391 WebContents* FakeDownloadItem::GetWebContents() const { |
| 389 NOTREACHED(); | 392 NOTREACHED(); |
| 390 return nullptr; | 393 return nullptr; |
| 391 } | 394 } |
| 392 | 395 |
| 393 void FakeDownloadItem::OnContentCheckCompleted(DownloadDangerType danger_type) { | 396 void FakeDownloadItem::OnContentCheckCompleted(DownloadDangerType danger_type) { |
| 394 NOTREACHED(); | 397 NOTREACHED(); |
| 395 } | 398 } |
| 396 | 399 |
| 397 void FakeDownloadItem::SetOpenWhenComplete(bool open) { | 400 void FakeDownloadItem::SetOpenWhenComplete(bool open) { |
| 398 NOTREACHED(); | 401 NOTREACHED(); |
| 399 } | 402 } |
| 400 | 403 |
| 401 void FakeDownloadItem::SetOpened(bool opened) { | 404 void FakeDownloadItem::SetOpened(bool opened) { |
| 402 NOTREACHED(); | 405 NOTREACHED(); |
| 403 } | 406 } |
| 404 | 407 |
| 405 void FakeDownloadItem::SetLastAccessTime(base::Time time) { | |
| 406 NOTREACHED(); | |
| 407 } | |
| 408 | |
| 409 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) { | 408 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) { |
| 410 NOTREACHED(); | 409 NOTREACHED(); |
| 411 } | 410 } |
| 412 | 411 |
| 413 std::string FakeDownloadItem::DebugString(bool verbose) const { | 412 std::string FakeDownloadItem::DebugString(bool verbose) const { |
| 414 NOTREACHED(); | 413 NOTREACHED(); |
| 415 return std::string(); | 414 return std::string(); |
| 416 } | 415 } |
| 417 | 416 |
| 418 } // namespace content | 417 } // namespace content |
| OLD | NEW |