OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "ppapi/proxy/host_resolver_resource.h" | 5 #include "ppapi/proxy/host_resolver_resource.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ppapi/c/private/ppb_host_resolver_private.h" | 8 #include "ppapi/c/private/ppb_host_resolver_private.h" |
9 #include "ppapi/proxy/net_address_resource.h" | 9 #include "ppapi/proxy/net_address_resource.h" |
10 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 if (hint.flags & PP_HOSTRESOLVER_FLAGS_LOOPBACK_ONLY) | 38 if (hint.flags & PP_HOSTRESOLVER_FLAGS_LOOPBACK_ONLY) |
39 private_hint.flags |= PP_HOST_RESOLVER_FLAGS_LOOPBACK_ONLY; | 39 private_hint.flags |= PP_HOST_RESOLVER_FLAGS_LOOPBACK_ONLY; |
40 | 40 |
41 return private_hint; | 41 return private_hint; |
42 } | 42 } |
43 | 43 |
44 } // namespace | 44 } // namespace |
45 | 45 |
46 HostResolverResource::HostResolverResource(Connection connection, | 46 HostResolverResource::HostResolverResource(Connection connection, |
47 PP_Instance instance) | 47 PP_Instance instance) |
48 : HostResolverResourceBase(connection, instance) { | 48 : HostResolverResourceBase(connection, instance, false) { |
49 } | 49 } |
50 | 50 |
51 HostResolverResource::~HostResolverResource() { | 51 HostResolverResource::~HostResolverResource() { |
52 } | 52 } |
53 | 53 |
54 thunk::PPB_HostResolver_API* HostResolverResource::AsPPB_HostResolver_API() { | 54 thunk::PPB_HostResolver_API* HostResolverResource::AsPPB_HostResolver_API() { |
55 return this; | 55 return this; |
56 } | 56 } |
57 | 57 |
58 int32_t HostResolverResource::Resolve(const char* host, | 58 int32_t HostResolverResource::Resolve(const char* host, |
(...skipping 19 matching lines...) Expand all Loading... |
78 PP_Resource HostResolverResource::GetNetAddress(uint32_t index) { | 78 PP_Resource HostResolverResource::GetNetAddress(uint32_t index) { |
79 scoped_refptr<NetAddressResource> addr_resource = GetNetAddressImpl(index); | 79 scoped_refptr<NetAddressResource> addr_resource = GetNetAddressImpl(index); |
80 if (!addr_resource.get()) | 80 if (!addr_resource.get()) |
81 return 0; | 81 return 0; |
82 | 82 |
83 return addr_resource->GetReference(); | 83 return addr_resource->GetReference(); |
84 } | 84 } |
85 | 85 |
86 } // namespace proxy | 86 } // namespace proxy |
87 } // namespace ppapi | 87 } // namespace ppapi |
OLD | NEW |