| Index: ppapi/proxy/tcp_socket_resource_base.cc
|
| diff --git a/ppapi/proxy/tcp_socket_resource_base.cc b/ppapi/proxy/tcp_socket_resource_base.cc
|
| index 3cc4fdd84a7f6f282b1798631cf10d09681729f0..2ec45c25f4f9d67aeb8f5e6f9bf5467e695738ee 100644
|
| --- a/ppapi/proxy/tcp_socket_resource_base.cc
|
| +++ b/ppapi/proxy/tcp_socket_resource_base.cc
|
| @@ -13,6 +13,7 @@
|
| #include "ppapi/c/pp_errors.h"
|
| #include "ppapi/proxy/error_conversion.h"
|
| #include "ppapi/proxy/ppapi_messages.h"
|
| +#include "ppapi/proxy/tcp_socket_resource_constants.h"
|
| #include "ppapi/shared_impl/ppapi_globals.h"
|
| #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h"
|
| #include "ppapi/shared_impl/socket_option_data.h"
|
| @@ -24,13 +25,6 @@
|
| namespace ppapi {
|
| namespace proxy {
|
|
|
| -const int32_t TCPSocketResourceBase::kMaxReadSize = 1024 * 1024;
|
| -const int32_t TCPSocketResourceBase::kMaxWriteSize = 1024 * 1024;
|
| -const int32_t TCPSocketResourceBase::kMaxSendBufferSize =
|
| - 1024 * TCPSocketResourceBase::kMaxWriteSize;
|
| -const int32_t TCPSocketResourceBase::kMaxReceiveBufferSize =
|
| - 1024 * TCPSocketResourceBase::kMaxReadSize;
|
| -
|
| TCPSocketResourceBase::TCPSocketResourceBase(Connection connection,
|
| PP_Instance instance,
|
| TCPSocketVersion version)
|
| @@ -212,7 +206,8 @@ int32_t TCPSocketResourceBase::ReadImpl(
|
| state_.IsPending(TCPSocketState::SSL_CONNECT))
|
| return PP_ERROR_INPROGRESS;
|
| read_buffer_ = buffer;
|
| - bytes_to_read_ = std::min(bytes_to_read, kMaxReadSize);
|
| + bytes_to_read_ =
|
| + std::min(bytes_to_read, TCPSocketResourceConstants::kMaxReadSize);
|
| read_callback_ = callback;
|
|
|
| Call<PpapiPluginMsg_TCPSocket_ReadReply>(
|
| @@ -237,8 +232,8 @@ int32_t TCPSocketResourceBase::WriteImpl(
|
| state_.IsPending(TCPSocketState::SSL_CONNECT))
|
| return PP_ERROR_INPROGRESS;
|
|
|
| - if (bytes_to_write > kMaxWriteSize)
|
| - bytes_to_write = kMaxWriteSize;
|
| + if (bytes_to_write > TCPSocketResourceConstants::kMaxWriteSize)
|
| + bytes_to_write = TCPSocketResourceConstants::kMaxWriteSize;
|
|
|
| write_callback_ = callback;
|
|
|
|
|