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

Side by Side Diff: ppapi/shared_impl/private/ppb_host_resolver_shared.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) 2012 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 PPAPI_SHARED_IMPL_PRIVATE_PPB_HOST_RESOLVER_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PRIVATE_PPB_HOST_RESOLVER_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_HOST_RESOLVER_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_HOST_RESOLVER_SHARED_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "ppapi/shared_impl/resource.h" 14 #include "ppapi/shared_impl/resource.h"
15 #include "ppapi/shared_impl/tracked_callback.h" 15 #include "ppapi/shared_impl/tracked_callback.h"
16 #include "ppapi/thunk/ppb_host_resolver_private_api.h" 16 #include "ppapi/thunk/ppb_host_resolver_private_api.h"
17 17
18 struct addrinfo; 18 namespace net {
19 class AddressList;
20 };
eroman 2012/05/04 01:08:41 remove semicolon.
19 21
20 namespace ppapi { 22 namespace ppapi {
21 23
22 struct HostPortPair { 24 struct HostPortPair {
23 std::string host; 25 std::string host;
24 uint16_t port; 26 uint16_t port;
25 }; 27 };
26 28
27 typedef std::vector<PP_NetAddress_Private> NetAddressList; 29 typedef std::vector<PP_NetAddress_Private> NetAddressList;
28 30
29 PPAPI_SHARED_EXPORT NetAddressList* 31 PPAPI_SHARED_EXPORT NetAddressList*
30 CreateNetAddressListFromAddrInfo(const addrinfo* ai); 32 CreateNetAddressListFromAddressList(const net::AddressList& list);
31 33
32 class PPAPI_SHARED_EXPORT PPB_HostResolver_Shared 34 class PPAPI_SHARED_EXPORT PPB_HostResolver_Shared
33 : public thunk::PPB_HostResolver_Private_API, 35 : public thunk::PPB_HostResolver_Private_API,
34 public Resource { 36 public Resource {
35 public: 37 public:
36 // C-tor used in Impl case. 38 // C-tor used in Impl case.
37 explicit PPB_HostResolver_Shared(PP_Instance instance); 39 explicit PPB_HostResolver_Shared(PP_Instance instance);
38 40
39 // C-tor used in Proxy case. 41 // C-tor used in Proxy case.
40 explicit PPB_HostResolver_Shared(const HostResource& resource); 42 explicit PPB_HostResolver_Shared(const HostResource& resource);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 76
75 std::string canonical_name_; 77 std::string canonical_name_;
76 NetAddressList net_address_list_; 78 NetAddressList net_address_list_;
77 79
78 DISALLOW_COPY_AND_ASSIGN(PPB_HostResolver_Shared); 80 DISALLOW_COPY_AND_ASSIGN(PPB_HostResolver_Shared);
79 }; 81 };
80 82
81 } // namespace ppapi 83 } // namespace ppapi
82 84
83 #endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_HOST_RESOLVER_SHARED_H_ 85 #endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_HOST_RESOLVER_SHARED_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698