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 "net/http/mock_http_cache.h" | 5 #include "net/http/mock_http_cache.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 const base::Time end_time, | 470 const base::Time end_time, |
471 const CompletionCallback& callback) { | 471 const CompletionCallback& callback) { |
472 return ERR_NOT_IMPLEMENTED; | 472 return ERR_NOT_IMPLEMENTED; |
473 } | 473 } |
474 | 474 |
475 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, | 475 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, |
476 const CompletionCallback& callback) { | 476 const CompletionCallback& callback) { |
477 return ERR_NOT_IMPLEMENTED; | 477 return ERR_NOT_IMPLEMENTED; |
478 } | 478 } |
479 | 479 |
| 480 int MockDiskCache::CalculateSizeOfEntriesBetween( |
| 481 base::Time initial_time, |
| 482 base::Time end_time, |
| 483 const CompletionCallback& callback) { |
| 484 return ERR_NOT_IMPLEMENTED; |
| 485 } |
| 486 |
480 class MockDiskCache::NotImplementedIterator : public Iterator { | 487 class MockDiskCache::NotImplementedIterator : public Iterator { |
481 public: | 488 public: |
482 int OpenNextEntry(disk_cache::Entry** next_entry, | 489 int OpenNextEntry(disk_cache::Entry** next_entry, |
483 const CompletionCallback& callback) override { | 490 const CompletionCallback& callback) override { |
484 return ERR_NOT_IMPLEMENTED; | 491 return ERR_NOT_IMPLEMENTED; |
485 } | 492 } |
486 }; | 493 }; |
487 | 494 |
488 scoped_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() { | 495 scoped_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() { |
489 return scoped_ptr<Iterator>(new NotImplementedIterator()); | 496 return scoped_ptr<Iterator>(new NotImplementedIterator()); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 if (!callback_.is_null()) { | 668 if (!callback_.is_null()) { |
662 if (!fail_) | 669 if (!fail_) |
663 backend_->reset(new MockDiskCache()); | 670 backend_->reset(new MockDiskCache()); |
664 CompletionCallback cb = callback_; | 671 CompletionCallback cb = callback_; |
665 callback_.Reset(); | 672 callback_.Reset(); |
666 cb.Run(Result()); // This object can be deleted here. | 673 cb.Run(Result()); // This object can be deleted here. |
667 } | 674 } |
668 } | 675 } |
669 | 676 |
670 } // namespace net | 677 } // namespace net |
OLD | NEW |