OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 return net::OK; | 604 return net::OK; |
605 | 605 |
606 CallbackLater(callback, net::OK); | 606 CallbackLater(callback, net::OK); |
607 return net::ERR_IO_PENDING; | 607 return net::ERR_IO_PENDING; |
608 } | 608 } |
609 | 609 |
610 int MockDiskCache::DoomAllEntries(net::OldCompletionCallback* callback) { | 610 int MockDiskCache::DoomAllEntries(net::OldCompletionCallback* callback) { |
611 return net::ERR_NOT_IMPLEMENTED; | 611 return net::ERR_NOT_IMPLEMENTED; |
612 } | 612 } |
613 | 613 |
| 614 int MockDiskCache::DoomAllEntries(const net::CompletionCallback& callback) { |
| 615 return net::ERR_NOT_IMPLEMENTED; |
| 616 } |
| 617 |
614 int MockDiskCache::DoomEntriesBetween(const base::Time initial_time, | 618 int MockDiskCache::DoomEntriesBetween(const base::Time initial_time, |
615 const base::Time end_time, | 619 const base::Time end_time, |
616 net::OldCompletionCallback* callback) { | 620 net::OldCompletionCallback* callback) { |
617 return net::ERR_NOT_IMPLEMENTED; | 621 return net::ERR_NOT_IMPLEMENTED; |
618 } | 622 } |
619 | 623 |
| 624 int MockDiskCache::DoomEntriesBetween(const base::Time initial_time, |
| 625 const base::Time end_time, |
| 626 const net::CompletionCallback& callback) { |
| 627 return net::ERR_NOT_IMPLEMENTED; |
| 628 } |
| 629 |
620 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, | 630 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, |
621 net::OldCompletionCallback* callback) { | 631 net::OldCompletionCallback* callback) { |
622 return net::ERR_NOT_IMPLEMENTED; | 632 return net::ERR_NOT_IMPLEMENTED; |
623 } | 633 } |
624 | 634 |
625 int MockDiskCache::OpenNextEntry(void** iter, disk_cache::Entry** next_entry, | 635 int MockDiskCache::OpenNextEntry(void** iter, disk_cache::Entry** next_entry, |
626 net::OldCompletionCallback* callback) { | 636 net::OldCompletionCallback* callback) { |
627 return net::ERR_NOT_IMPLEMENTED; | 637 return net::ERR_NOT_IMPLEMENTED; |
628 } | 638 } |
629 | 639 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 void MockBlockingBackendFactory::FinishCreation() { | 794 void MockBlockingBackendFactory::FinishCreation() { |
785 block_ = false; | 795 block_ = false; |
786 if (callback_) { | 796 if (callback_) { |
787 if (!fail_) | 797 if (!fail_) |
788 *backend_ = new MockDiskCache(); | 798 *backend_ = new MockDiskCache(); |
789 net::OldCompletionCallback* cb = callback_; | 799 net::OldCompletionCallback* cb = callback_; |
790 callback_ = NULL; | 800 callback_ = NULL; |
791 cb->Run(Result()); // This object can be deleted here. | 801 cb->Run(Result()); // This object can be deleted here. |
792 } | 802 } |
793 } | 803 } |
OLD | NEW |