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

Unified Diff: ppapi/proxy/tcp_socket_resource_constants.h

Issue 2727093003: Fix ASAN ODR violation in ppapi/proxy in component mode (Closed)
Patch Set: simplify, no export Created 3 years, 10 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.cc ('k') | ppapi/proxy/tcp_socket_resource_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/tcp_socket_resource_constants.h
diff --git a/ppapi/proxy/tcp_socket_resource_constants.h b/ppapi/proxy/tcp_socket_resource_constants.h
index 9c5833a7a876a025da2db0d5944f2c0c349e2958..d9d08b0412c056bb554646590d9f2b872f2dc33d 100644
--- a/ppapi/proxy/tcp_socket_resource_constants.h
+++ b/ppapi/proxy/tcp_socket_resource_constants.h
@@ -5,30 +5,29 @@
#include <stdint.h>
#include "base/macros.h"
-#include "ppapi/proxy/ppapi_proxy_export.h"
namespace ppapi {
namespace proxy {
-class PPAPI_PROXY_EXPORT TCPSocketResourceConstants {
+class TCPSocketResourceConstants {
public:
// The maximum number of bytes that each PpapiHostMsg_PPBTCPSocket_Read
// message is allowed to request.
- static const int32_t kMaxReadSize;
+ enum { kMaxReadSize = 1024 * 1024 };
// The maximum number of bytes that each PpapiHostMsg_PPBTCPSocket_Write
// message is allowed to carry.
- static const int32_t kMaxWriteSize;
+ enum { kMaxWriteSize = 1024 * 1024 };
// The maximum number that we allow for setting
// PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE. This number is only for input
// argument sanity check, it doesn't mean the browser guarantees to support
// such a buffer size.
- static const int32_t kMaxSendBufferSize;
+ enum { kMaxSendBufferSize = 1024 * kMaxWriteSize };
// The maximum number that we allow for setting
// PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE. This number is only for input
// argument sanity check, it doesn't mean the browser guarantees to support
// such a buffer size.
- static const int32_t kMaxReceiveBufferSize;
+ enum { kMaxReceiveBufferSize = 1024 * kMaxReadSize };
private:
DISALLOW_COPY_AND_ASSIGN(TCPSocketResourceConstants);
« no previous file with comments | « ppapi/proxy/tcp_socket_resource_base.cc ('k') | ppapi/proxy/tcp_socket_resource_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698