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

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: Missed some spots again. Created 5 years, 3 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) 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::CalculateSizeOfEntriesBetween(
474 base::Time initial_time,
475 base::Time end_time,
476 const CompletionCallback& callback) {
477 // TODO(msramek): Implement.
pasko 2015/09/04 14:11:50 for implementation I would suggest to wait for ind
msramek 2015/09/04 16:56:47 Acknowledged. But if you don't mind, I'll do that
pasko 2015/09/08 13:13:49 sure, sorry for the confusion, I only wrote it to
478 return net::ERR_NOT_IMPLEMENTED;
479 }
480
473 class SimpleBackendImpl::SimpleIterator final : public Iterator { 481 class SimpleBackendImpl::SimpleIterator final : public Iterator {
474 public: 482 public:
475 explicit SimpleIterator(base::WeakPtr<SimpleBackendImpl> backend) 483 explicit SimpleIterator(base::WeakPtr<SimpleBackendImpl> backend)
476 : backend_(backend), 484 : backend_(backend),
477 weak_factory_(this) { 485 weak_factory_(this) {
478 } 486 }
479 487
480 // From Backend::Iterator: 488 // From Backend::Iterator:
481 int OpenNextEntry(Entry** next_entry, 489 int OpenNextEntry(Entry** next_entry,
482 const CompletionCallback& callback) override { 490 const CompletionCallback& callback) override {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 } 741 }
734 742
735 // static 743 // static
736 void SimpleBackendImpl::FlushWorkerPoolForTesting() { 744 void SimpleBackendImpl::FlushWorkerPoolForTesting() {
737 // We only need to do this if we there is an active task runner. 745 // We only need to do this if we there is an active task runner.
738 if (base::ThreadTaskRunnerHandle::IsSet()) 746 if (base::ThreadTaskRunnerHandle::IsSet())
739 g_sequenced_worker_pool.Get().FlushForTesting(); 747 g_sequenced_worker_pool.Get().FlushForTesting();
740 } 748 }
741 749
742 } // namespace disk_cache 750 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698