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

Unified Diff: webkit/plugins/ppapi/ppb_transport_impl.cc

Issue 7888022: Add DISABLE_TCP_TRANSPORT flag in the Transport API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 3 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
« content/renderer/p2p/port_allocator.cc ('K') | « webkit/glue/p2p_transport.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_transport_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_transport_impl.cc b/webkit/plugins/ppapi/ppb_transport_impl.cc
index 5836b5f60c773ab0c65ea088dae7790cdc6aa434..063f9365ec5f5dae6f8b3fa5be3626ba3fde5074 100644
--- a/webkit/plugins/ppapi/ppb_transport_impl.cc
+++ b/webkit/plugins/ppapi/ppb_transport_impl.cc
@@ -178,9 +178,6 @@ int32_t PPB_Transport_Impl::SetProperty(PP_TransportProperty property,
}
case PP_TRANSPORTPROPERTY_TCP_RECEIVE_WINDOW: {
- if (!use_tcp_)
- return PP_ERROR_BADARGUMENT;
-
int32_t int_value = value.value.as_int;
if (value.type != PP_VARTYPE_INT32 || int_value < kMinBufferSize ||
int_value > kMaxBufferSize) {
@@ -226,6 +223,18 @@ int32_t PPB_Transport_Impl::SetProperty(PP_TransportProperty property,
break;
}
+ case PP_TRANSPORTPROPERTY_PROTOCOLS: {
+ if (!use_tcp_)
+ return PP_ERROR_BADARGUMENT;
+
+ if (value.type != PP_VARTYPE_INT32) {
+ return PP_ERROR_BADARGUMENT;
+ }
+
+ config_.protocols = value.value.as_int;
+ break;
+ }
+
default:
return PP_ERROR_BADARGUMENT;
}
« content/renderer/p2p/port_allocator.cc ('K') | « webkit/glue/p2p_transport.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698