Index: content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc |
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc |
index a76ca4eedd152a65ae23ee8ec0fcaba59fb0a99a..b9cda2bd27ea76a438d05fccbea32abcfe25966f 100644 |
--- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc |
+++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc |
@@ -455,17 +455,18 @@ int32_t PepperTCPSocketMessageFilter::OnMsgSetOption( |
if (!value.GetInt32(&integer_value) || integer_value <= 0) |
return PP_ERROR_BADARGUMENT; |
- bool result = false; |
+ int net_result = net::OK; |
Ryan Hamilton
2014/04/08 19:55:11
FYI, you could use ERR_UNEXPECTED here since you e
jar (doing other things)
2014/04/08 23:16:26
Done.
|
if (name == PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE) { |
if (integer_value > TCPSocketResourceBase::kMaxSendBufferSize) |
return PP_ERROR_BADARGUMENT; |
- result = socket_->SetSendBufferSize(integer_value); |
+ net_result = socket_->SetSendBufferSize(integer_value); |
} else { |
if (integer_value > TCPSocketResourceBase::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(); |