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

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

Issue 1304363013: Add a size estimation mechanism to StoragePartitionHttpCacheDataRemover. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static_cast Created 5 years, 2 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
« no previous file with comments | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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::CalculateSizeOfAllEntries(
481 const CompletionCallback& callback) {
482 return ERR_NOT_IMPLEMENTED;
483 }
484
480 class MockDiskCache::NotImplementedIterator : public Iterator { 485 class MockDiskCache::NotImplementedIterator : public Iterator {
481 public: 486 public:
482 int OpenNextEntry(disk_cache::Entry** next_entry, 487 int OpenNextEntry(disk_cache::Entry** next_entry,
483 const CompletionCallback& callback) override { 488 const CompletionCallback& callback) override {
484 return ERR_NOT_IMPLEMENTED; 489 return ERR_NOT_IMPLEMENTED;
485 } 490 }
486 }; 491 };
487 492
488 scoped_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() { 493 scoped_ptr<disk_cache::Backend::Iterator> MockDiskCache::CreateIterator() {
489 return scoped_ptr<Iterator>(new NotImplementedIterator()); 494 return scoped_ptr<Iterator>(new NotImplementedIterator());
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 if (!callback_.is_null()) { 666 if (!callback_.is_null()) {
662 if (!fail_) 667 if (!fail_)
663 backend_->reset(new MockDiskCache()); 668 backend_->reset(new MockDiskCache());
664 CompletionCallback cb = callback_; 669 CompletionCallback cb = callback_;
665 callback_.Reset(); 670 callback_.Reset();
666 cb.Run(Result()); // This object can be deleted here. 671 cb.Run(Result()); // This object can be deleted here.
667 } 672 }
668 } 673 }
669 674
670 } // namespace net 675 } // namespace net
OLDNEW
« no previous file with comments | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698