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

Unified Diff: net/disk_cache/entry_unittest.cc

Issue 501099: Http cache: Add a test to make sure that the cache... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/disk_cache_test_util.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_unittest.cc
===================================================================
--- net/disk_cache/entry_unittest.cc (revision 34517)
+++ net/disk_cache/entry_unittest.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/string_util.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
+#include "net/base/test_completion_callback.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
#include "net/disk_cache/entry_impl.h"
@@ -880,8 +881,8 @@
void VerifySparseIO(disk_cache::Entry* entry, int64 offset,
net::IOBuffer* buf_1, int size, bool async,
net::IOBuffer* buf_2) {
- SimpleCallbackTest callback;
- SimpleCallbackTest* cb = async ? &callback : NULL;
+ TestCompletionCallback callback;
+ TestCompletionCallback* cb = async ? &callback : NULL;
memset(buf_2->data(), 0, size);
int ret = entry->ReadSparseData(offset, buf_2, size, cb);
@@ -903,8 +904,8 @@
// same as the content of the provided |buffer|.
void VerifyContentSparseIO(disk_cache::Entry* entry, int64 offset, char* buffer,
int size, bool async) {
- SimpleCallbackTest callback;
- SimpleCallbackTest* cb = async ? &callback : NULL;
+ TestCompletionCallback callback;
+ TestCompletionCallback* cb = async ? &callback : NULL;
scoped_refptr<net::IOBuffer> buf_1 = new net::IOBuffer(size);
memset(buf_1->data(), 0, size);
@@ -1354,7 +1355,7 @@
scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSize);
CacheTestFillBuffer(buf->data(), kSize, false);
- SimpleCallbackTest cb1, cb2, cb3, cb4;
+ TestCompletionCallback cb1, cb2, cb3, cb4;
int64 offset = 0;
int tries = 0;
const int maxtries = 100; // Avoid hang on infinitely fast disks
« no previous file with comments | « net/disk_cache/disk_cache_test_util.cc ('k') | net/http/http_cache_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698