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

Side by Side Diff: net/disk_cache/disk_cache_test_base.cc

Issue 542733002: Remove void** from disk_cache interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more more explicit constructor 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/disk_cache/disk_cache_test_base.h" 5 #include "net/disk_cache/disk_cache_test_base.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 int rv = cache_->DoomEntriesBetween(initial_time, end_time, cb.callback()); 146 int rv = cache_->DoomEntriesBetween(initial_time, end_time, cb.callback());
147 return cb.GetResult(rv); 147 return cb.GetResult(rv);
148 } 148 }
149 149
150 int DiskCacheTestWithCache::DoomEntriesSince(const base::Time initial_time) { 150 int DiskCacheTestWithCache::DoomEntriesSince(const base::Time initial_time) {
151 net::TestCompletionCallback cb; 151 net::TestCompletionCallback cb;
152 int rv = cache_->DoomEntriesSince(initial_time, cb.callback()); 152 int rv = cache_->DoomEntriesSince(initial_time, cb.callback());
153 return cb.GetResult(rv); 153 return cb.GetResult(rv);
154 } 154 }
155 155
156 int DiskCacheTestWithCache::OpenNextEntry(void** iter, 156 int DiskCacheTestWithCache::OpenNextEntry(disk_cache::Backend::Iterator* iter,
157 disk_cache::Entry** next_entry) { 157 disk_cache::Entry** next_entry) {
158 net::TestCompletionCallback cb; 158 net::TestCompletionCallback cb;
159 int rv = cache_->OpenNextEntry(iter, next_entry, cb.callback()); 159 int rv = cache_->OpenNextEntry(iter, next_entry, cb.callback());
160 return cb.GetResult(rv); 160 return cb.GetResult(rv);
161 } 161 }
162 162
163 void DiskCacheTestWithCache::FlushQueueForTest() { 163 void DiskCacheTestWithCache::FlushQueueForTest() {
164 if (memory_only_ || !cache_impl_) 164 if (memory_only_ || !cache_impl_)
165 return; 165 return;
166 166
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 if (size_) 315 if (size_)
316 EXPECT_TRUE(cache_impl_->SetMaxSize(size_)); 316 EXPECT_TRUE(cache_impl_->SetMaxSize(size_));
317 if (new_eviction_) 317 if (new_eviction_)
318 cache_impl_->SetNewEviction(); 318 cache_impl_->SetNewEviction();
319 cache_impl_->SetType(type_); 319 cache_impl_->SetType(type_);
320 cache_impl_->SetFlags(flags); 320 cache_impl_->SetFlags(flags);
321 net::TestCompletionCallback cb; 321 net::TestCompletionCallback cb;
322 int rv = cache_impl_->Init(cb.callback()); 322 int rv = cache_impl_->Init(cb.callback());
323 ASSERT_EQ(net::OK, cb.GetResult(rv)); 323 ASSERT_EQ(net::OK, cb.GetResult(rv));
324 } 324 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698