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

Side by Side Diff: ppapi/proxy/host_resolver_resource.cc

Issue 17615004: Add "PRIVATE" to the enum names of some private Pepper networking APIs: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « ppapi/cpp/private/net_address_private.cc ('k') | ppapi/proxy/ppapi_messages.h » ('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 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"
11 11
12 namespace ppapi { 12 namespace ppapi {
13 namespace proxy { 13 namespace proxy {
14 14
15 namespace { 15 namespace {
16 16
17 PP_HostResolver_Private_Hint ConvertToHostResolverPrivateHint( 17 PP_HostResolver_Private_Hint ConvertToHostResolverPrivateHint(
18 const PP_HostResolver_Hint& hint) { 18 const PP_HostResolver_Hint& hint) {
19 PP_HostResolver_Private_Hint private_hint; 19 PP_HostResolver_Private_Hint private_hint;
20 switch (hint.family) { 20 switch (hint.family) {
21 case PP_NETADDRESS_FAMILY_UNSPECIFIED: 21 case PP_NETADDRESS_FAMILY_UNSPECIFIED:
22 private_hint.family = PP_NETADDRESSFAMILY_UNSPECIFIED; 22 private_hint.family = PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED;
23 break; 23 break;
24 case PP_NETADDRESS_FAMILY_IPV4: 24 case PP_NETADDRESS_FAMILY_IPV4:
25 private_hint.family = PP_NETADDRESSFAMILY_IPV4; 25 private_hint.family = PP_NETADDRESSFAMILY_PRIVATE_IPV4;
26 break; 26 break;
27 case PP_NETADDRESS_FAMILY_IPV6: 27 case PP_NETADDRESS_FAMILY_IPV6:
28 private_hint.family = PP_NETADDRESSFAMILY_IPV6; 28 private_hint.family = PP_NETADDRESSFAMILY_PRIVATE_IPV6;
29 break; 29 break;
30 default: 30 default:
31 NOTREACHED(); 31 NOTREACHED();
32 private_hint.family = PP_NETADDRESSFAMILY_UNSPECIFIED; 32 private_hint.family = PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED;
33 } 33 }
34 34
35 private_hint.flags = 0; 35 private_hint.flags = 0;
36 if (hint.flags & PP_HOSTRESOLVER_FLAG_CANONNAME) 36 if (hint.flags & PP_HOSTRESOLVER_FLAG_CANONNAME)
37 private_hint.flags |= PP_HOST_RESOLVER_FLAGS_CANONNAME; 37 private_hint.flags |= PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME;
38 38
39 return private_hint; 39 return private_hint;
40 } 40 }
41 41
42 } // namespace 42 } // namespace
43 43
44 HostResolverResource::HostResolverResource(Connection connection, 44 HostResolverResource::HostResolverResource(Connection connection,
45 PP_Instance instance) 45 PP_Instance instance)
46 : HostResolverResourceBase(connection, instance, false) { 46 : HostResolverResourceBase(connection, instance, false) {
47 } 47 }
(...skipping 28 matching lines...) Expand all
76 PP_Resource HostResolverResource::GetNetAddress(uint32_t index) { 76 PP_Resource HostResolverResource::GetNetAddress(uint32_t index) {
77 scoped_refptr<NetAddressResource> addr_resource = GetNetAddressImpl(index); 77 scoped_refptr<NetAddressResource> addr_resource = GetNetAddressImpl(index);
78 if (!addr_resource.get()) 78 if (!addr_resource.get())
79 return 0; 79 return 0;
80 80
81 return addr_resource->GetReference(); 81 return addr_resource->GetReference();
82 } 82 }
83 83
84 } // namespace proxy 84 } // namespace proxy
85 } // namespace ppapi 85 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/cpp/private/net_address_private.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698