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

Side by Side Diff: ppapi/cpp/private/net_address_private.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, 5 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/c/private/ppb_udp_socket_private.h ('k') | ppapi/proxy/host_resolver_resource.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) 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 #include "ppapi/cpp/private/net_address_private.h" 5 #include "ppapi/cpp/private/net_address_private.h"
6 6
7 #include "ppapi/c/pp_bool.h" 7 #include "ppapi/c/pp_bool.h"
8 #include "ppapi/cpp/module.h" 8 #include "ppapi/cpp/module.h"
9 #include "ppapi/cpp/module_impl.h" 9 #include "ppapi/cpp/module_impl.h"
10 #include "ppapi/cpp/var.h" 10 #include "ppapi/cpp/var.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return false; 143 return false;
144 } 144 }
145 145
146 // static 146 // static
147 PP_NetAddressFamily_Private NetAddressPrivate::GetFamily( 147 PP_NetAddressFamily_Private NetAddressPrivate::GetFamily(
148 const PP_NetAddress_Private& addr) { 148 const PP_NetAddress_Private& addr) {
149 if (has_interface<PPB_NetAddress_Private_1_1>()) 149 if (has_interface<PPB_NetAddress_Private_1_1>())
150 return get_interface<PPB_NetAddress_Private_1_1>()->GetFamily(&addr); 150 return get_interface<PPB_NetAddress_Private_1_1>()->GetFamily(&addr);
151 if (has_interface<PPB_NetAddress_Private_1_0>()) 151 if (has_interface<PPB_NetAddress_Private_1_0>())
152 return get_interface<PPB_NetAddress_Private_1_0>()->GetFamily(&addr); 152 return get_interface<PPB_NetAddress_Private_1_0>()->GetFamily(&addr);
153 return PP_NETADDRESSFAMILY_UNSPECIFIED; 153 return PP_NETADDRESSFAMILY_PRIVATE_UNSPECIFIED;
154 } 154 }
155 155
156 // static 156 // static
157 uint16_t NetAddressPrivate::GetPort(const PP_NetAddress_Private& addr) { 157 uint16_t NetAddressPrivate::GetPort(const PP_NetAddress_Private& addr) {
158 if (has_interface<PPB_NetAddress_Private_1_1>()) 158 if (has_interface<PPB_NetAddress_Private_1_1>())
159 return get_interface<PPB_NetAddress_Private_1_1>()->GetPort(&addr); 159 return get_interface<PPB_NetAddress_Private_1_1>()->GetPort(&addr);
160 if (has_interface<PPB_NetAddress_Private_1_0>()) 160 if (has_interface<PPB_NetAddress_Private_1_0>())
161 return get_interface<PPB_NetAddress_Private_1_0>()->GetPort(&addr); 161 return get_interface<PPB_NetAddress_Private_1_0>()->GetPort(&addr);
162 return 0; 162 return 0;
163 } 163 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 struct PP_NetAddress_Private* addr_out) { 209 struct PP_NetAddress_Private* addr_out) {
210 if (has_interface<PPB_NetAddress_Private_1_1>()) { 210 if (has_interface<PPB_NetAddress_Private_1_1>()) {
211 get_interface<PPB_NetAddress_Private_1_1>()->CreateFromIPv6Address( 211 get_interface<PPB_NetAddress_Private_1_1>()->CreateFromIPv6Address(
212 ip, scope_id, port, addr_out); 212 ip, scope_id, port, addr_out);
213 return true; 213 return true;
214 } 214 }
215 return false; 215 return false;
216 } 216 }
217 217
218 } // namespace pp 218 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_udp_socket_private.h ('k') | ppapi/proxy/host_resolver_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698