summaryrefslogtreecommitdiffstats
path: root/net/dns
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/dns
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/dns')
-rw-r--r--net/dns/async_host_resolver.cc10
-rw-r--r--net/dns/async_host_resolver.h4
-rw-r--r--net/dns/async_host_resolver_unittest.cc4
-rw-r--r--net/dns/dns_transaction.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/net/dns/async_host_resolver.cc b/net/dns/async_host_resolver.cc
index 27d307e..ed0d70f 100644
--- a/net/dns/async_host_resolver.cc
+++ b/net/dns/async_host_resolver.cc
@@ -86,7 +86,7 @@ class AsyncHostResolver::Request {
const BoundNetLog& request_net_log,
int id,
const HostResolver::RequestInfo& info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
AddressList* addresses)
: resolver_(resolver),
source_net_log_(source_net_log),
@@ -173,7 +173,7 @@ class AsyncHostResolver::Request {
if (result == OK)
*addresses_ = CreateAddressListUsingPort(addresses, info_.port());
DCHECK(callback_);
- CompletionCallback* callback = callback_;
+ OldCompletionCallback* callback = callback_;
callback_ = NULL;
resolver_->OnFinish(this, result);
callback->Run(result);
@@ -191,7 +191,7 @@ class AsyncHostResolver::Request {
const int id_;
const HostResolver::RequestInfo info_;
Key key_;
- CompletionCallback* callback_;
+ OldCompletionCallback* callback_;
AddressList* addresses_;
int result_;
};
@@ -230,7 +230,7 @@ AsyncHostResolver::~AsyncHostResolver() {
int AsyncHostResolver::Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& source_net_log) {
DCHECK(addresses);
@@ -410,7 +410,7 @@ void AsyncHostResolver::OnTransactionComplete(
AsyncHostResolver::Request* AsyncHostResolver::CreateNewRequest(
const RequestInfo& info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
AddressList* addresses,
const BoundNetLog& source_net_log) {
BoundNetLog request_net_log = BoundNetLog::Make(net_log_,
diff --git a/net/dns/async_host_resolver.h b/net/dns/async_host_resolver.h
index aecc403..9906720 100644
--- a/net/dns/async_host_resolver.h
+++ b/net/dns/async_host_resolver.h
@@ -41,7 +41,7 @@ class NET_EXPORT AsyncHostResolver
// HostResolver interface
virtual int Resolve(const RequestInfo& info,
AddressList* addresses,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
RequestHandle* out_req,
const BoundNetLog& source_net_log) OVERRIDE;
virtual int ResolveFromCache(const RequestInfo& info,
@@ -79,7 +79,7 @@ class NET_EXPORT AsyncHostResolver
// Create a new request for the incoming Resolve() call.
Request* CreateNewRequest(const RequestInfo& info,
- CompletionCallback* callback,
+ OldCompletionCallback* callback,
AddressList* addresses,
const BoundNetLog& source_net_log);
diff --git a/net/dns/async_host_resolver_unittest.cc b/net/dns/async_host_resolver_unittest.cc
index 95e6e38..7da3bc7 100644
--- a/net/dns/async_host_resolver_unittest.cc
+++ b/net/dns/async_host_resolver_unittest.cc
@@ -148,7 +148,7 @@ class AsyncHostResolverTest : public testing::Test {
TestPrng test_prng_;
RandIntCallback rand_int_cb_;
scoped_ptr<HostResolver> resolver_;
- TestCompletionCallback callback0_, callback1_, callback2_, callback3_;
+ TestOldCompletionCallback callback0_, callback1_, callback2_, callback3_;
};
TEST_F(AsyncHostResolverTest, EmptyHostLookup) {
@@ -455,7 +455,7 @@ TEST_F(AsyncHostResolverTest, OverflowQueueWithHighPriorityLookup) {
HostResolver::RequestInfo info(HostPortPair("cnn.com", 80));
info.set_address_family(ADDRESS_FAMILY_IPV4);
AddressList addrlist_fail;
- TestCompletionCallback callback_fail;
+ TestOldCompletionCallback callback_fail;
int rv_fail = resolver_->Resolve(info, &addrlist_fail, &callback_fail, NULL,
BoundNetLog());
EXPECT_EQ(1u,
diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
index 9a33ae4..27da32a 100644
--- a/net/dns/dns_transaction.h
+++ b/net/dns/dns_transaction.h
@@ -135,7 +135,7 @@ class NET_EXPORT_PRIVATE DnsTransaction :
State next_state_;
ClientSocketFactory* socket_factory_;
base::OneShotTimer<DnsTransaction> timer_;
- CompletionCallbackImpl<DnsTransaction> io_callback_;
+ OldCompletionCallbackImpl<DnsTransaction> io_callback_;
BoundNetLog net_log_;