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

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

Issue 542733002: Remove void** from disk_cache interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: narrow given upstream Created 6 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) 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/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 const base::Time end_time, 450 const base::Time end_time,
451 const net::CompletionCallback& callback) { 451 const net::CompletionCallback& callback) {
452 return net::ERR_NOT_IMPLEMENTED; 452 return net::ERR_NOT_IMPLEMENTED;
453 } 453 }
454 454
455 int MockDiskCache::DoomEntriesSince(const base::Time initial_time, 455 int MockDiskCache::DoomEntriesSince(const base::Time initial_time,
456 const net::CompletionCallback& callback) { 456 const net::CompletionCallback& callback) {
457 return net::ERR_NOT_IMPLEMENTED; 457 return net::ERR_NOT_IMPLEMENTED;
458 } 458 }
459 459
460 int MockDiskCache::OpenNextEntry(void** iter, disk_cache::Entry** next_entry, 460 int MockDiskCache::OpenNextEntry(Iterator* iter, disk_cache::Entry** next_entry,
461 const net::CompletionCallback& callback) { 461 const net::CompletionCallback& callback) {
462 return net::ERR_NOT_IMPLEMENTED; 462 return net::ERR_NOT_IMPLEMENTED;
463 } 463 }
464 464
465 void MockDiskCache::EndEnumeration(void** iter) {
466 }
467
468 void MockDiskCache::GetStats( 465 void MockDiskCache::GetStats(
469 std::vector<std::pair<std::string, std::string> >* stats) { 466 std::vector<std::pair<std::string, std::string> >* stats) {
470 } 467 }
471 468
472 void MockDiskCache::OnExternalCacheHit(const std::string& key) { 469 void MockDiskCache::OnExternalCacheHit(const std::string& key) {
473 } 470 }
474 471
475 void MockDiskCache::ReleaseAll() { 472 void MockDiskCache::ReleaseAll() {
476 EntryMap::iterator it = entries_.begin(); 473 EntryMap::iterator it = entries_.begin();
477 for (; it != entries_.end(); ++it) 474 for (; it != entries_.end(); ++it)
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 void MockBlockingBackendFactory::FinishCreation() { 623 void MockBlockingBackendFactory::FinishCreation() {
627 block_ = false; 624 block_ = false;
628 if (!callback_.is_null()) { 625 if (!callback_.is_null()) {
629 if (!fail_) 626 if (!fail_)
630 backend_->reset(new MockDiskCache()); 627 backend_->reset(new MockDiskCache());
631 net::CompletionCallback cb = callback_; 628 net::CompletionCallback cb = callback_;
632 callback_.Reset(); 629 callback_.Reset();
633 cb.Run(Result()); // This object can be deleted here. 630 cb.Run(Result()); // This object can be deleted here.
634 } 631 }
635 } 632 }
OLDNEW
« net/disk_cache/disk_cache.h ('K') | « net/http/mock_http_cache.h ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698