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

Unified Diff: net/url_request/view_cache_helper_unittest.cc

Issue 8794003: base::Bind: Convert disk_cache_based_ssl_host_info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove an OldCompletionCallback. Created 9 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
« net/http/mock_http_cache.cc ('K') | « net/url_request/view_cache_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/view_cache_helper_unittest.cc
diff --git a/net/url_request/view_cache_helper_unittest.cc b/net/url_request/view_cache_helper_unittest.cc
index 17bad618e92681fecdf44838e19ac10d71306b98..e911fccd3be5517496e3769e5b17ee195780d3dc 100644
--- a/net/url_request/view_cache_helper_unittest.cc
+++ b/net/url_request/view_cache_helper_unittest.cc
@@ -5,6 +5,7 @@
#include "net/url_request/view_cache_helper.h"
#include "base/pickle.h"
+#include "net/base/completion_callback.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/disk_cache/disk_cache.h"
@@ -85,10 +86,10 @@ void WriteToEntry(disk_cache::Backend* cache, const std::string key,
}
void FillCache(URLRequestContext* context) {
- TestOldCompletionCallback cb;
+ TestCompletionCallback cb;
disk_cache::Backend* cache;
- int rv =
- context->http_transaction_factory()->GetCache()->GetBackend(&cache, &cb);
+ int rv = context->http_transaction_factory()->GetCache()->GetBackend(
+ &cache, cb.callback());
ASSERT_EQ(OK, cb.GetResult(rv));
std::string empty;
@@ -180,15 +181,16 @@ TEST(ViewCacheHelper, TruncatedFlag) {
scoped_refptr<TestURLRequestContext> context(new TestURLRequestContext());
ViewCacheHelper helper;
- TestOldCompletionCallback cb;
+ TestCompletionCallback cb;
disk_cache::Backend* cache;
- int rv =
- context->http_transaction_factory()->GetCache()->GetBackend(&cache, &cb);
+ int rv = context->http_transaction_factory()->GetCache()->GetBackend(
+ &cache, cb.callback());
ASSERT_EQ(OK, cb.GetResult(rv));
std::string key("the key");
disk_cache::Entry* entry;
- rv = cache->CreateEntry(key, &entry, &cb);
+ TestOldCompletionCallback cb2;
+ rv = cache->CreateEntry(key, &entry, &cb2);
ASSERT_EQ(OK, cb.GetResult(rv));
// RESPONSE_INFO_TRUNCATED defined on response_info.cc
« net/http/mock_http_cache.cc ('K') | « net/url_request/view_cache_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698