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

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 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 | « no previous file | content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d0e672aa7a24e59c5a8ae14b24950fbf4dadb6a4 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 SocketOption {
+ 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 before Connect() is called.
+ int socket_options_;
+
+ // Locally cached value of buffer size.
+ 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
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698