diff options
author | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 21:50:40 +0000 |
---|---|---|
committer | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 21:50:40 +0000 |
commit | 95a214cd9711f435d3c964df768d394163e5c353 (patch) | |
tree | 000931469e217e37f27a93342f30408350367127 /net/socket | |
parent | 8e42ba22706ce8ca0fd374351f4221a26ebd5e0a (diff) | |
download | chromium_src-95a214cd9711f435d3c964df768d394163e5c353.zip chromium_src-95a214cd9711f435d3c964df768d394163e5c353.tar.gz chromium_src-95a214cd9711f435d3c964df768d394163e5c353.tar.bz2 |
HostResolver: don't interpret NULL callback argument as a request to do synchronous resolution.
BUG=90547,60149
TEST=net_unittests
Review URL: http://codereview.chromium.org/7492059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r-- | net/socket/socks_client_socket_unittest.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc index 6cc7418..437d657 100644 --- a/net/socket/socks_client_socket_unittest.cc +++ b/net/socket/socks_client_socket_unittest.cc @@ -89,21 +89,30 @@ class HangingHostResolver : public HostResolver { AddressList* addresses, CompletionCallback* callback, RequestHandle* out_req, - const BoundNetLog& net_log) { + const BoundNetLog& net_log) OVERRIDE { + DCHECK(addresses); + DCHECK(callback); EXPECT_FALSE(HasOutstandingRequest()); outstanding_request_ = reinterpret_cast<RequestHandle>(1); *out_req = outstanding_request_; return ERR_IO_PENDING; } - virtual void CancelRequest(RequestHandle req) { + virtual int ResolveFromCache(const RequestInfo& info, + AddressList* addresses, + const BoundNetLog& net_log) OVERRIDE { + NOTIMPLEMENTED(); + return ERR_UNEXPECTED; + } + + virtual void CancelRequest(RequestHandle req) OVERRIDE { EXPECT_TRUE(HasOutstandingRequest()); EXPECT_EQ(outstanding_request_, req); outstanding_request_ = NULL; } - virtual void AddObserver(Observer* observer) {} - virtual void RemoveObserver(Observer* observer) {} + virtual void AddObserver(Observer* observer) OVERRIDE {} + virtual void RemoveObserver(Observer* observer) OVERRIDE {} bool HasOutstandingRequest() { return outstanding_request_ != NULL; |