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

Unified Diff: ppapi/proxy/udp_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/udp_socket_resource_base.h ('k') | ppapi/proxy/udp_socket_resource_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/udp_socket_resource_base.cc
diff --git a/ppapi/proxy/udp_socket_resource_base.cc b/ppapi/proxy/udp_socket_resource_base.cc
index 795b63b40409b1913d62711c0f1faf0cec92d15b..552d9f10a31bef66b34905926e0021cda980b5bd 100644
--- a/ppapi/proxy/udp_socket_resource_base.cc
+++ b/ppapi/proxy/udp_socket_resource_base.cc
@@ -12,17 +12,13 @@
#include "ppapi/proxy/error_conversion.h"
#include "ppapi/proxy/plugin_globals.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/proxy/udp_socket_resource_constants.h"
#include "ppapi/shared_impl/socket_option_data.h"
#include "ppapi/thunk/enter.h"
namespace ppapi {
namespace proxy {
-const int32_t UDPSocketResourceBase::kMaxWriteSize = 128 * 1024;
-const int32_t UDPSocketResourceBase::kMaxSendBufferSize =
- 1024 * UDPSocketResourceBase::kMaxWriteSize;
-const size_t UDPSocketResourceBase::kPluginSendBufferSlots = 8u;
-
namespace {
void RunCallback(scoped_refptr<TrackedCallback> callback,
@@ -193,11 +189,12 @@ int32_t UDPSocketResourceBase::SendToImpl(
return PP_ERROR_BADARGUMENT;
if (!bound_)
return PP_ERROR_FAILED;
- if (sendto_callbacks_.size() == kPluginSendBufferSlots)
+ if (sendto_callbacks_.size() ==
+ UDPSocketResourceConstants::kPluginSendBufferSlots)
return PP_ERROR_INPROGRESS;
- if (num_bytes > kMaxWriteSize)
- num_bytes = kMaxWriteSize;
+ if (num_bytes > UDPSocketResourceConstants::kMaxWriteSize)
+ num_bytes = UDPSocketResourceConstants::kMaxWriteSize;
sendto_callbacks_.push(callback);
« no previous file with comments | « ppapi/proxy/udp_socket_resource_base.h ('k') | ppapi/proxy/udp_socket_resource_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698