Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: net/http/mock_http_cache.cc

Issue 2626173003: Calculate the size of all cache entries between two points in time. (Closed)
Patch Set: fix unit_tests compilation Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, 490 int MockDiskCache::DoomEntriesSince(const base::Time initial_time,
491 const CompletionCallback& callback) { 491 const CompletionCallback& callback) {
492 return ERR_NOT_IMPLEMENTED; 492 return ERR_NOT_IMPLEMENTED;
493 } 493 }
494 494
495 int MockDiskCache::CalculateSizeOfAllEntries( 495 int MockDiskCache::CalculateSizeOfAllEntries(
496 const CompletionCallback& callback) { 496 const CompletionCallback& callback) {
497 return ERR_NOT_IMPLEMENTED; 497 return ERR_NOT_IMPLEMENTED;
498 } 498 }
499 499
500 int MockDiskCache::CalculateSizeOfEntriesBetween(
501 base::Time initial_time,
502 base::Time end_time,
503 const CompletionCallback& callback) {
504 return ERR_NOT_IMPLEMENTED;
505 }
506
500 class MockDiskCache::NotImplementedIterator : public Iterator { 507 class MockDiskCache::NotImplementedIterator : public Iterator {
501 public: 508 public:
502 int OpenNextEntry(disk_cache::Entry** next_entry, 509 int OpenNextEntry(disk_cache::Entry** next_entry,
503 const CompletionCallback& callback) override { 510 const CompletionCallback& callback) override {
504 return ERR_NOT_IMPLEMENTED; 511 return ERR_NOT_IMPLEMENTED;
505 } 512 }
506 }; 513 };
507 514
508 std::unique_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() { 515 std::unique_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() {
509 return std::unique_ptr<Iterator>(new NotImplementedIterator()); 516 return std::unique_ptr<Iterator>(new NotImplementedIterator());
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 if (!callback_.is_null()) { 690 if (!callback_.is_null()) {
684 if (!fail_) 691 if (!fail_)
685 backend_->reset(new MockDiskCache()); 692 backend_->reset(new MockDiskCache());
686 CompletionCallback cb = callback_; 693 CompletionCallback cb = callback_;
687 callback_.Reset(); 694 callback_.Reset();
688 cb.Run(Result()); // This object can be deleted here. 695 cb.Run(Result()); // This object can be deleted here.
689 } 696 }
690 } 697 }
691 698
692 } // namespace net 699 } // namespace net
OLDNEW
« net/disk_cache/memory/mem_backend_impl.cc ('K') | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698