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

Side by Side Diff: net/disk_cache/simple/simple_backend_impl.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/disk_cache/simple/simple_backend_impl.h ('k') | net/http/mock_http_cache.h » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/disk_cache/simple/simple_backend_impl.h" 5 #include "net/disk_cache/simple/simple_backend_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdlib> 8 #include <cstdlib>
9 #include <functional> 9 #include <functional>
10 10
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 base::Bind(&SimpleBackendImpl::IndexReadyForDoom, AsWeakPtr(), 463 base::Bind(&SimpleBackendImpl::IndexReadyForDoom, AsWeakPtr(),
464 initial_time, end_time, callback)); 464 initial_time, end_time, callback));
465 } 465 }
466 466
467 int SimpleBackendImpl::DoomEntriesSince( 467 int SimpleBackendImpl::DoomEntriesSince(
468 const Time initial_time, 468 const Time initial_time,
469 const CompletionCallback& callback) { 469 const CompletionCallback& callback) {
470 return DoomEntriesBetween(initial_time, Time(), callback); 470 return DoomEntriesBetween(initial_time, Time(), callback);
471 } 471 }
472 472
473 int SimpleBackendImpl::CalculateSizeOfAllEntries(
474 const CompletionCallback& callback) {
475 // TODO(msramek): Implement.
476 return net::ERR_NOT_IMPLEMENTED;
477 }
478
473 class SimpleBackendImpl::SimpleIterator final : public Iterator { 479 class SimpleBackendImpl::SimpleIterator final : public Iterator {
474 public: 480 public:
475 explicit SimpleIterator(base::WeakPtr<SimpleBackendImpl> backend) 481 explicit SimpleIterator(base::WeakPtr<SimpleBackendImpl> backend)
476 : backend_(backend), 482 : backend_(backend),
477 weak_factory_(this) { 483 weak_factory_(this) {
478 } 484 }
479 485
480 // From Backend::Iterator: 486 // From Backend::Iterator:
481 int OpenNextEntry(Entry** next_entry, 487 int OpenNextEntry(Entry** next_entry,
482 const CompletionCallback& callback) override { 488 const CompletionCallback& callback) override {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 } 739 }
734 740
735 // static 741 // static
736 void SimpleBackendImpl::FlushWorkerPoolForTesting() { 742 void SimpleBackendImpl::FlushWorkerPoolForTesting() {
737 // We only need to do this if we there is an active task runner. 743 // We only need to do this if we there is an active task runner.
738 if (base::ThreadTaskRunnerHandle::IsSet()) 744 if (base::ThreadTaskRunnerHandle::IsSet())
739 g_sequenced_worker_pool.Get().FlushForTesting(); 745 g_sequenced_worker_pool.Get().FlushForTesting();
740 } 746 }
741 747
742 } // namespace disk_cache 748 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.h ('k') | net/http/mock_http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698