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

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

Issue 21133: Revert "Clean up dns prefetch code, and also port it." (Closed)
Patch Set: Created 11 years, 10 months 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
« no previous file with comments | « chrome/test/unit/unit_tests.scons ('k') | net/base/host_resolver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 23 matching lines...) Expand all
34 // called. 34 // called.
35 ~HostResolver(); 35 ~HostResolver();
36 36
37 // Resolves the given hostname (or IP address literal), filling out the 37 // Resolves the given hostname (or IP address literal), filling out the
38 // |addresses| object upon success. The |port| parameter will be set as the 38 // |addresses| object upon success. The |port| parameter will be set as the
39 // sin(6)_port field of the sockaddr_in{6} struct. Returns OK if successful 39 // sin(6)_port field of the sockaddr_in{6} struct. Returns OK if successful
40 // or an error code upon failure. 40 // or an error code upon failure.
41 // 41 //
42 // When callback is null, the operation completes synchronously. 42 // When callback is null, the operation completes synchronously.
43 // 43 //
44 // When callback is non-null, the operation will be performed asynchronously. 44 // When callback is non-null, ERR_IO_PENDING is returned if the operation
45 // ERR_IO_PENDING is returned if it has been scheduled successfully. Real 45 // could not be completed synchronously, in which case the result code will
46 // result code will be passed to the completion callback. 46 // be passed to the callback when available.
47 //
47 int Resolve(const std::string& hostname, int port, 48 int Resolve(const std::string& hostname, int port,
48 AddressList* addresses, CompletionCallback* callback); 49 AddressList* addresses, CompletionCallback* callback);
49 50
50 private: 51 private:
51 class Request; 52 class Request;
52 friend class Request; 53 friend class Request;
53 scoped_refptr<Request> request_; 54 scoped_refptr<Request> request_;
54 DISALLOW_COPY_AND_ASSIGN(HostResolver); 55 DISALLOW_COPY_AND_ASSIGN(HostResolver);
55 }; 56 };
56 57
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // 89 //
89 // NOTE: In most cases, you should use ScopedHostMapper instead, which is 90 // NOTE: In most cases, you should use ScopedHostMapper instead, which is
90 // defined in host_resolver_unittest.h 91 // defined in host_resolver_unittest.h
91 // 92 //
92 HostMapper* SetHostMapper(HostMapper* host_mapper); 93 HostMapper* SetHostMapper(HostMapper* host_mapper);
93 #endif 94 #endif
94 95
95 } // namespace net 96 } // namespace net
96 97
97 #endif // NET_BASE_HOST_RESOLVER_H_ 98 #endif // NET_BASE_HOST_RESOLVER_H_
OLDNEW
« no previous file with comments | « chrome/test/unit/unit_tests.scons ('k') | net/base/host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698