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

Unified Diff: ppapi/proxy/udp_socket_resource.cc

Issue 16959005: Implement PPB_UDPSocket_Dev: part 2 (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/udp_socket_private_resource.cc ('k') | ppapi/proxy/udp_socket_resource_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/udp_socket_resource.cc
diff --git a/ppapi/proxy/udp_socket_resource.cc b/ppapi/proxy/udp_socket_resource.cc
index 9a1dbd6c9b0b0445629a5756a279952c9f09fd7b..373a1ca65ee850d069140889786b60787d18c479 100644
--- a/ppapi/proxy/udp_socket_resource.cc
+++ b/ppapi/proxy/udp_socket_resource.cc
@@ -21,7 +21,7 @@ typedef thunk::EnterResourceNoLock<thunk::PPB_NetAddress_API>
UDPSocketResource::UDPSocketResource(Connection connection,
PP_Instance instance)
- : UDPSocketResourceBase(connection, instance) {
+ : UDPSocketResourceBase(connection, instance, false) {
}
UDPSocketResource::~UDPSocketResource() {
@@ -78,21 +78,8 @@ void UDPSocketResource::Close() {
int32_t UDPSocketResource::SetOption(
PP_UDPSocket_Option_Dev name,
const PP_Var& value,
- scoped_refptr<TrackedCallback> /* callback */) {
- // TODO(yzshen): Add support for other options.
- PP_UDPSocketFeature_Private feature;
- switch (name) {
- case PP_UDPSOCKET_OPTION_ADDRESS_REUSE:
- feature = PP_UDPSOCKETFEATURE_ADDRESS_REUSE;
- break;
- case PP_UDPSOCKET_OPTION_BROADCAST:
- feature = PP_UDPSOCKETFEATURE_BROADCAST;
- break;
- default:
- return PP_ERROR_NOTSUPPORTED;
- }
-
- return SetSocketFeatureImpl(feature, value);
+ scoped_refptr<TrackedCallback> callback) {
+ return SetOptionImpl(name, value, callback);
}
} // namespace proxy
« no previous file with comments | « ppapi/proxy/udp_socket_private_resource.cc ('k') | ppapi/proxy/udp_socket_resource_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698