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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 return net::OK; | 435 return net::OK; |
436 | 436 |
437 CallbackLater(callback, net::OK); | 437 CallbackLater(callback, net::OK); |
438 return net::ERR_IO_PENDING; | 438 return net::ERR_IO_PENDING; |
439 } | 439 } |
440 | 440 |
441 int MockDiskCache::DoomAllEntries(net::OldCompletionCallback* callback) { | 441 int MockDiskCache::DoomAllEntries(net::OldCompletionCallback* callback) { |
442 return net::ERR_NOT_IMPLEMENTED; | 442 return net::ERR_NOT_IMPLEMENTED; |
443 } | 443 } |
444 | 444 |
| 445 int MockDiskCache::DoomAllEntries(const net::CompletionCallback& callback) { |
| 446 return net::ERR_NOT_IMPLEMENTED; |
| 447 } |
| 448 |
445 int MockDiskCache::DoomEntriesBetween(const base::Time initial_time, | 449 int MockDiskCache::DoomEntriesBetween(const base::Time initial_time, |
446 const base::Time end_time, | 450 const base::Time end_time, |
447 net::OldCompletionCallback* callback) { | 451 net::OldCompletionCallback* callback) { |
448 return net::ERR_NOT_IMPLEMENTED; | 452 return net::ERR_NOT_IMPLEMENTED; |
449 } | 453 } |
450 | 454 |
| 455 int MockDiskCache::DoomEntriesBetween(const base::Time initial_time, |
| 456 const base::Time end_time, |
| 457 const net::CompletionCallback& callback) { |
| 458 return net::ERR_NOT_IMPLEMENTED; |
| 459 } |
| 460 |
451 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, | 461 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, |
452 net::OldCompletionCallback* callback) { | 462 net::OldCompletionCallback* callback) { |
453 return net::ERR_NOT_IMPLEMENTED; | 463 return net::ERR_NOT_IMPLEMENTED; |
454 } | 464 } |
455 | 465 |
456 int MockDiskCache::OpenNextEntry(void** iter, disk_cache::Entry** next_entry, | 466 int MockDiskCache::OpenNextEntry(void** iter, disk_cache::Entry** next_entry, |
457 net::OldCompletionCallback* callback) { | 467 net::OldCompletionCallback* callback) { |
458 return net::ERR_NOT_IMPLEMENTED; | 468 return net::ERR_NOT_IMPLEMENTED; |
459 } | 469 } |
460 | 470 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 void MockBlockingBackendFactory::FinishCreation() { | 619 void MockBlockingBackendFactory::FinishCreation() { |
610 block_ = false; | 620 block_ = false; |
611 if (callback_) { | 621 if (callback_) { |
612 if (!fail_) | 622 if (!fail_) |
613 *backend_ = new MockDiskCache(); | 623 *backend_ = new MockDiskCache(); |
614 net::OldCompletionCallback* cb = callback_; | 624 net::OldCompletionCallback* cb = callback_; |
615 callback_ = NULL; | 625 callback_ = NULL; |
616 cb->Run(Result()); // This object can be deleted here. | 626 cb->Run(Result()); // This object can be deleted here. |
617 } | 627 } |
618 } | 628 } |
OLD | NEW |