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

Side by Side Diff: net/dns/async_host_resolver.h

Issue 8549004: base::Bind: Convert HostResolver::Resolve. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_DNS_ASYNC_HOST_RESOLVER_H_ 5 #ifndef NET_DNS_ASYNC_HOST_RESOLVER_H_
6 #define NET_DNS_ASYNC_HOST_RESOLVER_H_ 6 #define NET_DNS_ASYNC_HOST_RESOLVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 22 matching lines...) Expand all
33 size_t max_pending_requests_, 33 size_t max_pending_requests_,
34 const RandIntCallback& rand_int, 34 const RandIntCallback& rand_int,
35 HostCache* cache, 35 HostCache* cache,
36 ClientSocketFactory* factory, 36 ClientSocketFactory* factory,
37 NetLog* net_log); 37 NetLog* net_log);
38 virtual ~AsyncHostResolver(); 38 virtual ~AsyncHostResolver();
39 39
40 // HostResolver interface 40 // HostResolver interface
41 virtual int Resolve(const RequestInfo& info, 41 virtual int Resolve(const RequestInfo& info,
42 AddressList* addresses, 42 AddressList* addresses,
43 OldCompletionCallback* callback, 43 const CompletionCallback& callback,
44 RequestHandle* out_req, 44 RequestHandle* out_req,
45 const BoundNetLog& source_net_log) OVERRIDE; 45 const BoundNetLog& source_net_log) OVERRIDE;
46 virtual int ResolveFromCache(const RequestInfo& info, 46 virtual int ResolveFromCache(const RequestInfo& info,
47 AddressList* addresses, 47 AddressList* addresses,
48 const BoundNetLog& source_net_log) OVERRIDE; 48 const BoundNetLog& source_net_log) OVERRIDE;
49 virtual void CancelRequest(RequestHandle req_handle) OVERRIDE; 49 virtual void CancelRequest(RequestHandle req_handle) OVERRIDE;
50 virtual void AddObserver(HostResolver::Observer* observer) OVERRIDE; 50 virtual void AddObserver(HostResolver::Observer* observer) OVERRIDE;
51 virtual void RemoveObserver(HostResolver::Observer* observer) OVERRIDE; 51 virtual void RemoveObserver(HostResolver::Observer* observer) OVERRIDE;
52 virtual void SetDefaultAddressFamily(AddressFamily address_family) OVERRIDE; 52 virtual void SetDefaultAddressFamily(AddressFamily address_family) OVERRIDE;
53 virtual AddressFamily GetDefaultAddressFamily() const OVERRIDE; 53 virtual AddressFamily GetDefaultAddressFamily() const OVERRIDE;
(...skipping 17 matching lines...) Expand all
71 71
72 class Request; 72 class Request;
73 73
74 typedef DnsTransaction::Key Key; 74 typedef DnsTransaction::Key Key;
75 typedef std::list<Request*> RequestList; 75 typedef std::list<Request*> RequestList;
76 typedef std::list<const DnsTransaction*> TransactionList; 76 typedef std::list<const DnsTransaction*> TransactionList;
77 typedef std::map<Key, RequestList> KeyRequestListMap; 77 typedef std::map<Key, RequestList> KeyRequestListMap;
78 78
79 // Create a new request for the incoming Resolve() call. 79 // Create a new request for the incoming Resolve() call.
80 Request* CreateNewRequest(const RequestInfo& info, 80 Request* CreateNewRequest(const RequestInfo& info,
81 OldCompletionCallback* callback, 81 const CompletionCallback& callback,
82 AddressList* addresses, 82 AddressList* addresses,
83 const BoundNetLog& source_net_log); 83 const BoundNetLog& source_net_log);
84 84
85 // Called when a request has just been started. 85 // Called when a request has just been started.
86 void OnStart(Request* request); 86 void OnStart(Request* request);
87 87
88 // Called when a request has just completed (before its callback is run). 88 // Called when a request has just completed (before its callback is run).
89 void OnFinish(Request* request, int result); 89 void OnFinish(Request* request, int result);
90 90
91 // Called when a request has been cancelled. 91 // Called when a request has been cancelled.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 int next_request_id_; 153 int next_request_id_;
154 154
155 NetLog* net_log_; 155 NetLog* net_log_;
156 156
157 DISALLOW_COPY_AND_ASSIGN(AsyncHostResolver); 157 DISALLOW_COPY_AND_ASSIGN(AsyncHostResolver);
158 }; 158 };
159 159
160 } // namespace net 160 } // namespace net
161 161
162 #endif // NET_DNS_ASYNC_HOST_RESOLVER_H_ 162 #endif // NET_DNS_ASYNC_HOST_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698