| 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 "content/public/test/fake_download_item.h" | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 | 8 | 
| 9 using content::DownloadItem; | 9 namespace content { | 
| 10 |  | 
| 11 namespace test { |  | 
| 12 | 10 | 
| 13 FakeDownloadItem::FakeDownloadItem() = default; | 11 FakeDownloadItem::FakeDownloadItem() = default; | 
| 14 | 12 | 
| 15 FakeDownloadItem::~FakeDownloadItem() { | 13 FakeDownloadItem::~FakeDownloadItem() { | 
| 16   NotifyDownloadRemoved(); | 14   NotifyDownloadRemoved(); | 
| 17   NotifyDownloadDestroyed(); | 15   NotifyDownloadDestroyed(); | 
| 18 } | 16 } | 
| 19 | 17 | 
| 20 void FakeDownloadItem::AddObserver(Observer* observer) { | 18 void FakeDownloadItem::AddObserver(Observer* observer) { | 
| 21   observers_.AddObserver(observer); | 19   observers_.AddObserver(observer); | 
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 157 } | 155 } | 
| 158 | 156 | 
| 159 void FakeDownloadItem::OpenDownload() { | 157 void FakeDownloadItem::OpenDownload() { | 
| 160   NOTREACHED(); | 158   NOTREACHED(); | 
| 161 } | 159 } | 
| 162 | 160 | 
| 163 void FakeDownloadItem::ShowDownloadInShell() { | 161 void FakeDownloadItem::ShowDownloadInShell() { | 
| 164   NOTREACHED(); | 162   NOTREACHED(); | 
| 165 } | 163 } | 
| 166 | 164 | 
| 167 content::DownloadInterruptReason FakeDownloadItem::GetLastReason() const { | 165 DownloadInterruptReason FakeDownloadItem::GetLastReason() const { | 
| 168   NOTREACHED(); | 166   NOTREACHED(); | 
| 169   return content::DownloadInterruptReason(); | 167   return DownloadInterruptReason(); | 
| 170 } | 168 } | 
| 171 | 169 | 
| 172 bool FakeDownloadItem::IsPaused() const { | 170 bool FakeDownloadItem::IsPaused() const { | 
| 173   NOTREACHED(); | 171   NOTREACHED(); | 
| 174   return false; | 172   return false; | 
| 175 } | 173 } | 
| 176 | 174 | 
| 177 bool FakeDownloadItem::IsTemporary() const { | 175 bool FakeDownloadItem::IsTemporary() const { | 
| 178   NOTREACHED(); | 176   NOTREACHED(); | 
| 179   return false; | 177   return false; | 
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 287 void FakeDownloadItem::DeleteFile(const base::Callback<void(bool)>& callback) { | 285 void FakeDownloadItem::DeleteFile(const base::Callback<void(bool)>& callback) { | 
| 288   NOTREACHED(); | 286   NOTREACHED(); | 
| 289   callback.Run(false); | 287   callback.Run(false); | 
| 290 } | 288 } | 
| 291 | 289 | 
| 292 bool FakeDownloadItem::IsDangerous() const { | 290 bool FakeDownloadItem::IsDangerous() const { | 
| 293   NOTREACHED(); | 291   NOTREACHED(); | 
| 294   return false; | 292   return false; | 
| 295 } | 293 } | 
| 296 | 294 | 
| 297 content::DownloadDangerType FakeDownloadItem::GetDangerType() const { | 295 DownloadDangerType FakeDownloadItem::GetDangerType() const { | 
| 298   NOTREACHED(); | 296   NOTREACHED(); | 
| 299   return content::DownloadDangerType(); | 297   return DownloadDangerType(); | 
| 300 } | 298 } | 
| 301 | 299 | 
| 302 bool FakeDownloadItem::TimeRemaining(base::TimeDelta* remaining) const { | 300 bool FakeDownloadItem::TimeRemaining(base::TimeDelta* remaining) const { | 
| 303   NOTREACHED(); | 301   NOTREACHED(); | 
| 304   return false; | 302   return false; | 
| 305 } | 303 } | 
| 306 | 304 | 
| 307 int64_t FakeDownloadItem::CurrentSpeed() const { | 305 int64_t FakeDownloadItem::CurrentSpeed() const { | 
| 308   NOTREACHED(); | 306   NOTREACHED(); | 
| 309   return 1; | 307   return 1; | 
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 364 bool FakeDownloadItem::GetOpened() const { | 362 bool FakeDownloadItem::GetOpened() const { | 
| 365   NOTREACHED(); | 363   NOTREACHED(); | 
| 366   return false; | 364   return false; | 
| 367 } | 365 } | 
| 368 | 366 | 
| 369 base::Time FakeDownloadItem::GetLastAccessTime() const { | 367 base::Time FakeDownloadItem::GetLastAccessTime() const { | 
| 370   NOTREACHED(); | 368   NOTREACHED(); | 
| 371   return base::Time(); | 369   return base::Time(); | 
| 372 } | 370 } | 
| 373 | 371 | 
| 374 content::BrowserContext* FakeDownloadItem::GetBrowserContext() const { | 372 BrowserContext* FakeDownloadItem::GetBrowserContext() const { | 
| 375   NOTREACHED(); | 373   NOTREACHED(); | 
| 376   return nullptr; | 374   return nullptr; | 
| 377 } | 375 } | 
| 378 | 376 | 
| 379 content::WebContents* FakeDownloadItem::GetWebContents() const { | 377 WebContents* FakeDownloadItem::GetWebContents() const { | 
| 380   NOTREACHED(); | 378   NOTREACHED(); | 
| 381   return nullptr; | 379   return nullptr; | 
| 382 } | 380 } | 
| 383 | 381 | 
| 384 void FakeDownloadItem::OnContentCheckCompleted( | 382 void FakeDownloadItem::OnContentCheckCompleted(DownloadDangerType danger_type) { | 
| 385     content::DownloadDangerType danger_type) { |  | 
| 386   NOTREACHED(); | 383   NOTREACHED(); | 
| 387 } | 384 } | 
| 388 | 385 | 
| 389 void FakeDownloadItem::SetOpenWhenComplete(bool open) { | 386 void FakeDownloadItem::SetOpenWhenComplete(bool open) { | 
| 390   NOTREACHED(); | 387   NOTREACHED(); | 
| 391 } | 388 } | 
| 392 | 389 | 
| 393 void FakeDownloadItem::SetOpened(bool opened) { | 390 void FakeDownloadItem::SetOpened(bool opened) { | 
| 394   NOTREACHED(); | 391   NOTREACHED(); | 
| 395 } | 392 } | 
| 396 | 393 | 
| 397 void FakeDownloadItem::SetLastAccessTime(base::Time time) { | 394 void FakeDownloadItem::SetLastAccessTime(base::Time time) { | 
| 398   NOTREACHED(); | 395   NOTREACHED(); | 
| 399 } | 396 } | 
| 400 | 397 | 
| 401 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) { | 398 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) { | 
| 402   NOTREACHED(); | 399   NOTREACHED(); | 
| 403 } | 400 } | 
| 404 | 401 | 
| 405 std::string FakeDownloadItem::DebugString(bool verbose) const { | 402 std::string FakeDownloadItem::DebugString(bool verbose) const { | 
| 406   NOTREACHED(); | 403   NOTREACHED(); | 
| 407   return std::string(); | 404   return std::string(); | 
| 408 } | 405 } | 
| 409 | 406 | 
| 410 }  // namespace test | 407 }  // namespace content | 
| OLD | NEW | 
|---|