| 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 "chrome/browser/ntp_snippets/fake_download_item.h" | 5 #include "chrome/browser/ntp_snippets/fake_download_item.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 | 8 |
| 9 using content::DownloadItem; | 9 using content::DownloadItem; |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 void FakeDownloadItem::SetFileExternallyRemoved( | 74 void FakeDownloadItem::SetFileExternallyRemoved( |
| 75 bool is_file_externally_removed) { | 75 bool is_file_externally_removed) { |
| 76 is_file_externally_removed_ = is_file_externally_removed; | 76 is_file_externally_removed_ = is_file_externally_removed; |
| 77 } | 77 } |
| 78 | 78 |
| 79 bool FakeDownloadItem::GetFileExternallyRemoved() const { | 79 bool FakeDownloadItem::GetFileExternallyRemoved() const { |
| 80 return is_file_externally_removed_; | 80 return is_file_externally_removed_; |
| 81 } | 81 } |
| 82 | 82 |
| 83 void FakeDownloadItem::SetStartTime(const base::Time& start_time) { | 83 void FakeDownloadItem::SetStartTime(base::Time start_time) { |
| 84 start_time_ = start_time; | 84 start_time_ = start_time; |
| 85 } | 85 } |
| 86 | 86 |
| 87 base::Time FakeDownloadItem::GetStartTime() const { | 87 base::Time FakeDownloadItem::GetStartTime() const { |
| 88 return start_time_; | 88 return start_time_; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void FakeDownloadItem::SetEndTime(const base::Time& end_time) { | 91 void FakeDownloadItem::SetEndTime(base::Time end_time) { |
| 92 end_time_ = end_time; | 92 end_time_ = end_time; |
| 93 } | 93 } |
| 94 | 94 |
| 95 base::Time FakeDownloadItem::GetEndTime() const { | 95 base::Time FakeDownloadItem::GetEndTime() const { |
| 96 return end_time_; | 96 return end_time_; |
| 97 } | 97 } |
| 98 | 98 |
| 99 void FakeDownloadItem::SetState(const DownloadState& state) { | 99 void FakeDownloadItem::SetState(const DownloadState& state) { |
| 100 download_state_ = state; | 100 download_state_ = state; |
| 101 } | 101 } |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 bool FakeDownloadItem::GetAutoOpened() { | 356 bool FakeDownloadItem::GetAutoOpened() { |
| 357 NOTREACHED(); | 357 NOTREACHED(); |
| 358 return false; | 358 return false; |
| 359 } | 359 } |
| 360 | 360 |
| 361 bool FakeDownloadItem::GetOpened() const { | 361 bool FakeDownloadItem::GetOpened() const { |
| 362 NOTREACHED(); | 362 NOTREACHED(); |
| 363 return false; | 363 return false; |
| 364 } | 364 } |
| 365 | 365 |
| 366 base::Time FakeDownloadItem::GetLastAccessTime() const { |
| 367 NOTREACHED(); |
| 368 return base::Time(); |
| 369 } |
| 370 |
| 366 content::BrowserContext* FakeDownloadItem::GetBrowserContext() const { | 371 content::BrowserContext* FakeDownloadItem::GetBrowserContext() const { |
| 367 NOTREACHED(); | 372 NOTREACHED(); |
| 368 return nullptr; | 373 return nullptr; |
| 369 } | 374 } |
| 370 | 375 |
| 371 content::WebContents* FakeDownloadItem::GetWebContents() const { | 376 content::WebContents* FakeDownloadItem::GetWebContents() const { |
| 372 NOTREACHED(); | 377 NOTREACHED(); |
| 373 return nullptr; | 378 return nullptr; |
| 374 } | 379 } |
| 375 | 380 |
| 376 void FakeDownloadItem::OnContentCheckCompleted( | 381 void FakeDownloadItem::OnContentCheckCompleted( |
| 377 content::DownloadDangerType danger_type) { | 382 content::DownloadDangerType danger_type) { |
| 378 NOTREACHED(); | 383 NOTREACHED(); |
| 379 } | 384 } |
| 380 | 385 |
| 381 void FakeDownloadItem::SetOpenWhenComplete(bool open) { | 386 void FakeDownloadItem::SetOpenWhenComplete(bool open) { |
| 382 NOTREACHED(); | 387 NOTREACHED(); |
| 383 } | 388 } |
| 384 | 389 |
| 385 void FakeDownloadItem::SetOpened(bool opened) { | 390 void FakeDownloadItem::SetOpened(bool opened) { |
| 386 NOTREACHED(); | 391 NOTREACHED(); |
| 387 } | 392 } |
| 388 | 393 |
| 394 void FakeDownloadItem::SetLastAccessTime(base::Time time) { |
| 395 NOTREACHED(); |
| 396 } |
| 397 |
| 389 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) { | 398 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) { |
| 390 NOTREACHED(); | 399 NOTREACHED(); |
| 391 } | 400 } |
| 392 | 401 |
| 393 std::string FakeDownloadItem::DebugString(bool verbose) const { | 402 std::string FakeDownloadItem::DebugString(bool verbose) const { |
| 394 NOTREACHED(); | 403 NOTREACHED(); |
| 395 return std::string(); | 404 return std::string(); |
| 396 } | 405 } |
| 397 | 406 |
| 398 } // namespace test | 407 } // namespace test |
| OLD | NEW |