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

Unified Diff: net/disk_cache/disk_cache_test_base.cc

Issue 3167020: Disk cache: Extend the internal buffering performed by each entry... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/disk_cache_test_base.cc
===================================================================
--- net/disk_cache/disk_cache_test_base.cc (revision 55505)
+++ net/disk_cache/disk_cache_test_base.cc (working copy)
@@ -4,6 +4,7 @@
#include "net/disk_cache/disk_cache_test_base.h"
+#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/disk_cache/backend_impl.h"
@@ -190,3 +191,35 @@
int rv = cache_impl_->FlushQueueForTest(&cb);
EXPECT_EQ(net::OK, cb.GetResult(rv));
}
+
+int DiskCacheTestWithCache::ReadData(disk_cache::Entry* entry, int index,
+ int offset, net::IOBuffer* buf, int len) {
+ TestCompletionCallback cb;
+ int rv = entry->ReadData(index, offset, buf, len, &cb);
+ return cb.GetResult(rv);
+}
+
+
+int DiskCacheTestWithCache::WriteData(disk_cache::Entry* entry, int index,
+ int offset, net::IOBuffer* buf, int len,
+ bool truncate) {
+ TestCompletionCallback cb;
+ int rv = entry->WriteData(index, offset, buf, len, &cb, truncate);
+ return cb.GetResult(rv);
+}
+
+int DiskCacheTestWithCache::ReadSparseData(disk_cache::Entry* entry,
+ int64 offset, net::IOBuffer* buf,
+ int len) {
+ TestCompletionCallback cb;
+ int rv = entry->ReadSparseData(offset, buf, len, &cb);
+ return cb.GetResult(rv);
+}
+
+int DiskCacheTestWithCache::WriteSparseData(disk_cache::Entry* entry,
+ int64 offset,
+ net::IOBuffer* buf, int len) {
+ TestCompletionCallback cb;
+ int rv = entry->WriteSparseData(offset, buf, len, &cb);
+ return cb.GetResult(rv);
+}
gavinp 2010/08/19 18:17:22 nit: add a newline

Powered by Google App Engine
This is Rietveld 408576698