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

Unified Diff: net/proxy/sync_host_resolver_bridge_unittest.cc

Issue 8985012: base::Bind: Convert net/proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more include. 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
« no previous file with comments | « net/proxy/sync_host_resolver_bridge.cc ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/sync_host_resolver_bridge_unittest.cc
diff --git a/net/proxy/sync_host_resolver_bridge_unittest.cc b/net/proxy/sync_host_resolver_bridge_unittest.cc
index d8622557e5cbc1004d6a1988286605d81ff6a333..ed81e2cb939ab286512d4b9e24f511a32901935b 100644
--- a/net/proxy/sync_host_resolver_bridge_unittest.cc
+++ b/net/proxy/sync_host_resolver_bridge_unittest.cc
@@ -83,10 +83,10 @@ class SyncProxyResolver : public ProxyResolver {
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
- OldCompletionCallback* callback,
+ const CompletionCallback& callback,
RequestHandle* request,
const BoundNetLog& net_log) {
- EXPECT_FALSE(callback);
+ EXPECT_FALSE(!callback.is_null());
EXPECT_FALSE(request);
// Do a synchronous host resolve.
@@ -124,7 +124,7 @@ class SyncProxyResolver : public ProxyResolver {
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
- OldCompletionCallback* callback) OVERRIDE {
+ const CompletionCallback& callback) OVERRIDE {
return OK;
}
@@ -178,15 +178,16 @@ class IOThread : public base::Thread {
1u));
// Initialize the resolver.
- TestOldCompletionCallback callback;
+ TestCompletionCallback callback;
proxy_resolver_->SetPacScript(ProxyResolverScriptData::FromURL(GURL()),
- &callback);
+ callback.callback());
EXPECT_EQ(OK, callback.WaitForResult());
// Start an asynchronous request to the proxy resolver
// (note that it will never complete).
- proxy_resolver_->GetProxyForURL(GURL("http://test/"), &results_,
- &callback_, &request_, BoundNetLog());
+ proxy_resolver_->GetProxyForURL(
+ GURL("http://test/"), &results_, callback_.callback(), &request_,
+ BoundNetLog());
}
virtual void CleanUp() OVERRIDE {
@@ -214,7 +215,7 @@ class IOThread : public base::Thread {
scoped_ptr<ProxyResolver> proxy_resolver_;
// Data for the outstanding request to the single threaded proxy resolver.
- TestOldCompletionCallback callback_;
+ TestCompletionCallback callback_;
ProxyInfo results_;
ProxyResolver::RequestHandle request_;
};
« no previous file with comments | « net/proxy/sync_host_resolver_bridge.cc ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698