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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, | 630 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, |
631 net::OldCompletionCallback* callback) { | 631 net::OldCompletionCallback* callback) { |
632 return net::ERR_NOT_IMPLEMENTED; | 632 return net::ERR_NOT_IMPLEMENTED; |
633 } | 633 } |
634 | 634 |
635 int MockDiskCache::OpenNextEntry(void** iter, disk_cache::Entry** next_entry, | 635 int MockDiskCache::OpenNextEntry(void** iter, disk_cache::Entry** next_entry, |
636 net::OldCompletionCallback* callback) { | 636 net::OldCompletionCallback* callback) { |
637 return net::ERR_NOT_IMPLEMENTED; | 637 return net::ERR_NOT_IMPLEMENTED; |
638 } | 638 } |
639 | 639 |
| 640 int MockDiskCache::OpenNextEntry(void** iter, disk_cache::Entry** next_entry, |
| 641 const net::CompletionCallback& callback) { |
| 642 return net::ERR_NOT_IMPLEMENTED; |
| 643 } |
| 644 |
640 void MockDiskCache::EndEnumeration(void** iter) { | 645 void MockDiskCache::EndEnumeration(void** iter) { |
641 } | 646 } |
642 | 647 |
643 void MockDiskCache::GetStats( | 648 void MockDiskCache::GetStats( |
644 std::vector<std::pair<std::string, std::string> >* stats) { | 649 std::vector<std::pair<std::string, std::string> >* stats) { |
645 } | 650 } |
646 | 651 |
647 void MockDiskCache::OnExternalCacheHit(const std::string& key) { | 652 void MockDiskCache::OnExternalCacheHit(const std::string& key) { |
648 } | 653 } |
649 | 654 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 void MockBlockingBackendFactory::FinishCreation() { | 799 void MockBlockingBackendFactory::FinishCreation() { |
795 block_ = false; | 800 block_ = false; |
796 if (callback_) { | 801 if (callback_) { |
797 if (!fail_) | 802 if (!fail_) |
798 *backend_ = new MockDiskCache(); | 803 *backend_ = new MockDiskCache(); |
799 net::OldCompletionCallback* cb = callback_; | 804 net::OldCompletionCallback* cb = callback_; |
800 callback_ = NULL; | 805 callback_ = NULL; |
801 cb->Run(Result()); // This object can be deleted here. | 806 cb->Run(Result()); // This object can be deleted here. |
802 } | 807 } |
803 } | 808 } |
OLD | NEW |