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

Unified Diff: ppapi/proxy/tcp_socket_resource_base.cc

Issue 2652123003: Make ppapi/proxy child-process only (Closed)
Patch Set: component Created 3 years, 11 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/tcp_socket_resource_base.h ('k') | ppapi/proxy/tcp_socket_resource_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ppapi/proxy/tcp_socket_resource_base.h ('k') | ppapi/proxy/tcp_socket_resource_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698