Index: content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc |
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc |
index 416273765e083915cb17ad6842a03a21bd5e251a..bcaf2aea3482cdb4cb4a7170bd6bf7ad42e1be8a 100644 |
--- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc |
+++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc |
@@ -140,21 +140,22 @@ int32_t PepperUDPSocketMessageFilter::OnMsgSetOption( |
if (!value.GetInt32(&integer_value) || integer_value <= 0) |
return PP_ERROR_BADARGUMENT; |
- bool result = false; |
+ int net_result = net::ERR_UNEXPECTED; |
if (name == PP_UDPSOCKET_OPTION_SEND_BUFFER_SIZE) { |
if (integer_value > |
ppapi::proxy::UDPSocketResourceBase::kMaxSendBufferSize) { |
return PP_ERROR_BADARGUMENT; |
} |
- result = socket_->SetSendBufferSize(integer_value); |
+ net_result = socket_->SetSendBufferSize(integer_value); |
} else { |
if (integer_value > |
ppapi::proxy::UDPSocketResourceBase::kMaxReceiveBufferSize) { |
return PP_ERROR_BADARGUMENT; |
} |
- result = socket_->SetReceiveBufferSize(integer_value); |
+ net_result = socket_->SetReceiveBufferSize(integer_value); |
} |
- return result ? PP_OK : PP_ERROR_FAILED; |
+ // TODO(wtc): Add error mapping code. |
+ return (net_result == net::OK) ? PP_OK : PP_ERROR_FAILED; |
} |
default: { |
NOTREACHED(); |