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

Side by Side Diff: net/base/host_resolver.h

Issue 8549004: base::Bind: Convert HostResolver::Resolve. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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_BASE_HOST_RESOLVER_H_ 5 #ifndef NET_BASE_HOST_RESOLVER_H_
6 #define NET_BASE_HOST_RESOLVER_H_ 6 #define NET_BASE_HOST_RESOLVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 virtual ~HostResolver(); 109 virtual ~HostResolver();
110 110
111 // Resolves the given hostname (or IP address literal), filling out the 111 // Resolves the given hostname (or IP address literal), filling out the
112 // |addresses| object upon success. The |info.port| parameter will be set as 112 // |addresses| object upon success. The |info.port| parameter will be set as
113 // the sin(6)_port field of the sockaddr_in{6} struct. Returns OK if 113 // the sin(6)_port field of the sockaddr_in{6} struct. Returns OK if
114 // successful or an error code upon failure. Returns 114 // successful or an error code upon failure. Returns
115 // ERR_NAME_NOT_RESOLVED if hostname is invalid, or if it is an 115 // ERR_NAME_NOT_RESOLVED if hostname is invalid, or if it is an
116 // incompatible IP literal (e.g. IPv6 is disabled and it is an IPv6 116 // incompatible IP literal (e.g. IPv6 is disabled and it is an IPv6
117 // literal). 117 // literal).
118 // 118 //
119 // If the operation cannnot be completed synchronously, ERR_IO_PENDING will 119 // If the operation cannot be completed synchronously, ERR_IO_PENDING will
120 // be returned and the real result code will be passed to the completion 120 // be returned and the real result code will be passed to the completion
121 // callback. Otherwise the result code is returned immediately from this 121 // callback. Otherwise the result code is returned immediately from this
122 // call. 122 // call.
123 // 123 //
124 // If |out_req| is non-NULL, then |*out_req| will be filled with a handle to 124 // If |out_req| is non-NULL, then |*out_req| will be filled with a handle to
125 // the async request. This handle is not valid after the request has 125 // the async request. This handle is not valid after the request has
126 // completed. 126 // completed.
127 // 127 //
128 // Profiling information for the request is saved to |net_log| if non-NULL. 128 // Profiling information for the request is saved to |net_log| if non-NULL.
129 virtual int Resolve(const RequestInfo& info, 129 virtual int Resolve(const RequestInfo& info,
130 AddressList* addresses, 130 AddressList* addresses,
131 OldCompletionCallback* callback, 131 const CompletionCallback& callback,
132 RequestHandle* out_req, 132 RequestHandle* out_req,
133 const BoundNetLog& net_log) = 0; 133 const BoundNetLog& net_log) = 0;
134 134
135 // Resolves the given hostname (or IP address literal) out of cache 135 // Resolves the given hostname (or IP address literal) out of cache
136 // only. This is guaranteed to complete synchronously. This acts like 136 // only. This is guaranteed to complete synchronously. This acts like
137 // |Resolve()| if the hostname is IP literal or cached value exists. 137 // |Resolve()| if the hostname is IP literal or cached value exists.
138 // Otherwise, ERR_DNS_CACHE_MISS is returned. 138 // Otherwise, ERR_DNS_CACHE_MISS is returned.
139 virtual int ResolveFromCache(const RequestInfo& info, 139 virtual int ResolveFromCache(const RequestInfo& info,
140 AddressList* addresses, 140 AddressList* addresses,
141 const BoundNetLog& net_log) = 0; 141 const BoundNetLog& net_log) = 0;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 NetLog* net_log); 183 NetLog* net_log);
184 184
185 // Creates a HostResolver implementation that sends actual DNS queries to 185 // Creates a HostResolver implementation that sends actual DNS queries to
186 // the specified DNS server and parses response and returns results. 186 // the specified DNS server and parses response and returns results.
187 NET_EXPORT HostResolver* CreateAsyncHostResolver(size_t max_concurrent_resolves, 187 NET_EXPORT HostResolver* CreateAsyncHostResolver(size_t max_concurrent_resolves,
188 const IPAddressNumber& dns_ip, 188 const IPAddressNumber& dns_ip,
189 NetLog* net_log); 189 NetLog* net_log);
190 } // namespace net 190 } // namespace net
191 191
192 #endif // NET_BASE_HOST_RESOLVER_H_ 192 #endif // NET_BASE_HOST_RESOLVER_H_
OLDNEW
« no previous file with comments | « jingle/notifier/communicator/xmpp_connection_generator.cc ('k') | net/base/host_resolver_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698