summaryrefslogtreecommitdiffstats
path: root/net/url_request/view_cache_helper_unittest.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-01 20:38:10 +0000
commitf1f3f0f8af3740ec2afaebcaed410950a9cc0ac8 (patch)
tree6ccdd87ccfc89adbcb372c517559fa61fbc6c6b2 /net/url_request/view_cache_helper_unittest.cc
parentd1666539b57bf8552e203d355fd09909d36f9732 (diff)
downloadchromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.zip
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.gz
chromium_src-f1f3f0f8af3740ec2afaebcaed410950a9cc0ac8.tar.bz2
Begin CompletionCallback switchover.
Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/view_cache_helper_unittest.cc')
-rw-r--r--net/url_request/view_cache_helper_unittest.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/url_request/view_cache_helper_unittest.cc b/net/url_request/view_cache_helper_unittest.cc
index be9b30d..a0c3d1e 100644
--- a/net/url_request/view_cache_helper_unittest.cc
+++ b/net/url_request/view_cache_helper_unittest.cc
@@ -47,7 +47,7 @@ void WriteHeaders(disk_cache::Entry* entry, int flags, const std::string data) {
reinterpret_cast<const char*>(pickle.data())));
int len = static_cast<int>(pickle.size());
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(0, 0, buf, len, &cb, true);
ASSERT_EQ(len, cb.GetResult(rv));
}
@@ -60,7 +60,7 @@ void WriteData(disk_cache::Entry* entry, int index, const std::string data) {
scoped_refptr<IOBuffer> buf(new IOBuffer(len));
memcpy(buf->data(), data.data(), data.length());
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = entry->WriteData(index, 0, buf, len, &cb, true);
ASSERT_EQ(len, cb.GetResult(rv));
}
@@ -68,7 +68,7 @@ void WriteData(disk_cache::Entry* entry, int index, const std::string data) {
void WriteToEntry(disk_cache::Backend* cache, const std::string key,
const std::string data0, const std::string data1,
const std::string data2) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Entry* entry;
int rv = cache->CreateEntry(key, &entry, &cb);
rv = cb.GetResult(rv);
@@ -85,7 +85,7 @@ void WriteToEntry(disk_cache::Backend* cache, const std::string key,
}
void FillCache(URLRequestContext* context) {
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv =
context->http_transaction_factory()->GetCache()->GetBackend(&cache, &cb);
@@ -103,7 +103,7 @@ TEST(ViewCacheHelper, EmptyCache) {
scoped_refptr<TestURLRequestContext> context(new TestURLRequestContext());
ViewCacheHelper helper;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
std::string prefix, data;
int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
EXPECT_EQ(OK, cb.GetResult(rv));
@@ -117,7 +117,7 @@ TEST(ViewCacheHelper, ListContents) {
FillCache(context);
std::string prefix, data;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
EXPECT_EQ(OK, cb.GetResult(rv));
@@ -139,7 +139,7 @@ TEST(ViewCacheHelper, DumpEntry) {
FillCache(context);
std::string data;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = helper.GetEntryInfoHTML("second", context, &data, &cb);
EXPECT_EQ(OK, cb.GetResult(rv));
@@ -165,7 +165,7 @@ TEST(ViewCacheHelper, Prefix) {
std::string key, data;
std::string prefix("prefix:");
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
int rv = helper.GetContentsHTML(context, prefix, &data, &cb);
EXPECT_EQ(OK, cb.GetResult(rv));
@@ -180,7 +180,7 @@ TEST(ViewCacheHelper, TruncatedFlag) {
scoped_refptr<TestURLRequestContext> context(new TestURLRequestContext());
ViewCacheHelper helper;
- TestCompletionCallback cb;
+ TestOldCompletionCallback cb;
disk_cache::Backend* cache;
int rv =
context->http_transaction_factory()->GetCache()->GetBackend(&cache, &cb);