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

Unified Diff: content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h

Issue 690903002: Remove timing limitation of SetOption invocation for PPAPI sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
index 7c9250f48995bc4e6fd35d377c06dc9da08e5294..e29e657d948f0c01bda7885037666090f00c055e 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
@@ -63,6 +63,12 @@ class CONTENT_EXPORT PepperTCPSocketMessageFilter
static size_t GetNumInstances();
private:
+ enum SocketOptions {
+ SOCKET_OPTION_NODELAY = 1 << 0,
+ SOCKET_OPTION_RCVBUF_SIZE = 1 << 1,
+ SOCKET_OPTION_SNDBUF_SIZE = 1 << 2
+ };
+
~PepperTCPSocketMessageFilter() override;
// ppapi::host::ResourceMessageFilter overrides.
@@ -185,6 +191,14 @@ class CONTENT_EXPORT PepperTCPSocketMessageFilter
scoped_ptr<net::SingleRequestHostResolver> resolver_;
+ // Bitwise-or of SocketOption flags. This stores the state about whether
+ // each option is set.
+ int socket_options_;
+
+ // Receive/Send buffer sizes which is set before connect().
jar (doing other things) 2014/11/04 22:51:09 This code actually sets this value whether called
hidehiko 2014/11/05 12:48:29 As we do not take care about "default" value here,
+ int32_t rcvbuf_size_;
+ int32_t sndbuf_size_;
+
// |address_list_| may store multiple addresses when
// PPB_TCPSocket_Private.Connect() is used, which involves name resolution.
// In that case, we will try each address in the list until a connection is

Powered by Google App Engine
This is Rietveld 408576698