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

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

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_EXPORT to *PortOnAddressList. Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PROC_H_ 5 #ifndef NET_BASE_HOST_RESOLVER_PROC_H_
6 #define NET_BASE_HOST_RESOLVER_PROC_H_ 6 #define NET_BASE_HOST_RESOLVER_PROC_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "net/base/address_family.h" 12 #include "net/base/address_family.h"
13 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
14 14
15 namespace net { 15 namespace net {
16 16
17 class AddressList; 17 class AddressList;
18 18
19 // Sets the port on each element in |list| to |port|.
20 void NET_EXPORT SetPortOnAddressList(uint16 port, AddressList* list);
eroman 2012/05/04 01:08:41 This doesn't feel like the right place to house th
szym 2012/05/04 02:38:29 Only HostResolver-related code uses this, but this
eroman 2012/05/04 04:20:22 Sounds like a good plan.
21
22 // As above, but skips work if first port on |list| matches |port|.
23 void NET_EXPORT EnsurePortOnAddressList(uint16 port, AddressList* list);
24
19 // Interface for a getaddrinfo()-like procedure. This is used by unit-tests 25 // Interface for a getaddrinfo()-like procedure. This is used by unit-tests
20 // to control the underlying resolutions in HostResolverImpl. HostResolverProcs 26 // to control the underlying resolutions in HostResolverImpl. HostResolverProcs
21 // can be chained together; they fallback to the next procedure in the chain 27 // can be chained together; they fallback to the next procedure in the chain
22 // by calling ResolveUsingPrevious(). 28 // by calling ResolveUsingPrevious().
23 // 29 //
24 // Note that implementations of HostResolverProc *MUST BE THREADSAFE*, since 30 // Note that implementations of HostResolverProc *MUST BE THREADSAFE*, since
25 // the HostResolver implementation using them can be multi-threaded. 31 // the HostResolver implementation using them can be multi-threaded.
26 class NET_EXPORT HostResolverProc 32 class NET_EXPORT HostResolverProc
27 : public base::RefCountedThreadSafe<HostResolverProc> { 33 : public base::RefCountedThreadSafe<HostResolverProc> {
28 public: 34 public:
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 NET_EXPORT_PRIVATE int SystemHostResolverProc( 94 NET_EXPORT_PRIVATE int SystemHostResolverProc(
89 const std::string& host, 95 const std::string& host,
90 AddressFamily address_family, 96 AddressFamily address_family,
91 HostResolverFlags host_resolver_flags, 97 HostResolverFlags host_resolver_flags,
92 AddressList* addrlist, 98 AddressList* addrlist,
93 int* os_error); 99 int* os_error);
94 100
95 } // namespace net 101 } // namespace net
96 102
97 #endif // NET_BASE_HOST_RESOLVER_PROC_H_ 103 #endif // NET_BASE_HOST_RESOLVER_PROC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698