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

Side by Side Diff: ppapi/proxy/udp_socket_private_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/proxy/ppapi_messages.h ('k') | ppapi/shared_impl/private/net_address_private_impl.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/proxy/udp_socket_private_resource.h" 5 #include "ppapi/proxy/udp_socket_private_resource.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/c/ppb_udp_socket.h" 8 #include "ppapi/c/ppb_udp_socket.h"
9 #include "ppapi/shared_impl/tracked_callback.h" 9 #include "ppapi/shared_impl/tracked_callback.h"
10 10
(...skipping 11 matching lines...) Expand all
22 thunk::PPB_UDPSocket_Private_API* 22 thunk::PPB_UDPSocket_Private_API*
23 UDPSocketPrivateResource::AsPPB_UDPSocket_Private_API() { 23 UDPSocketPrivateResource::AsPPB_UDPSocket_Private_API() {
24 return this; 24 return this;
25 } 25 }
26 26
27 int32_t UDPSocketPrivateResource::SetSocketFeature( 27 int32_t UDPSocketPrivateResource::SetSocketFeature(
28 PP_UDPSocketFeature_Private name, 28 PP_UDPSocketFeature_Private name,
29 PP_Var value) { 29 PP_Var value) {
30 PP_UDPSocket_Option public_name = PP_UDPSOCKET_OPTION_ADDRESS_REUSE; 30 PP_UDPSocket_Option public_name = PP_UDPSOCKET_OPTION_ADDRESS_REUSE;
31 switch (name) { 31 switch (name) {
32 case PP_UDPSOCKETFEATURE_ADDRESS_REUSE: 32 case PP_UDPSOCKETFEATURE_PRIVATE_ADDRESS_REUSE:
33 // |public_name| has been initialized above. 33 // |public_name| has been initialized above.
34 break; 34 break;
35 case PP_UDPSOCKETFEATURE_BROADCAST: 35 case PP_UDPSOCKETFEATURE_PRIVATE_BROADCAST:
36 public_name = PP_UDPSOCKET_OPTION_BROADCAST; 36 public_name = PP_UDPSOCKET_OPTION_BROADCAST;
37 break; 37 break;
38 case PP_UDPSOCKETFEATURE_COUNT: 38 case PP_UDPSOCKETFEATURE_PRIVATE_COUNT:
39 return PP_ERROR_BADARGUMENT; 39 return PP_ERROR_BADARGUMENT;
40 default: 40 default:
41 NOTREACHED(); 41 NOTREACHED();
42 return PP_ERROR_BADARGUMENT; 42 return PP_ERROR_BADARGUMENT;
43 } 43 }
44 int32_t result = SetOptionImpl(public_name, value, NULL); 44 int32_t result = SetOptionImpl(public_name, value, NULL);
45 return result == PP_OK_COMPLETIONPENDING ? PP_OK : result; 45 return result == PP_OK_COMPLETIONPENDING ? PP_OK : result;
46 } 46 }
47 47
48 int32_t UDPSocketPrivateResource::Bind( 48 int32_t UDPSocketPrivateResource::Bind(
(...skipping 25 matching lines...) Expand all
74 scoped_refptr<TrackedCallback> callback) { 74 scoped_refptr<TrackedCallback> callback) {
75 return SendToImpl(buffer, num_bytes, addr, callback); 75 return SendToImpl(buffer, num_bytes, addr, callback);
76 } 76 }
77 77
78 void UDPSocketPrivateResource::Close() { 78 void UDPSocketPrivateResource::Close() {
79 CloseImpl(); 79 CloseImpl();
80 } 80 }
81 81
82 } // namespace proxy 82 } // namespace proxy
83 } // namespace ppapi 83 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/shared_impl/private/net_address_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698