diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 21:24:08 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 21:24:08 +0000 |
commit | d98104317f904eb9282bbc69596ae2feb9df0bf6 (patch) | |
tree | 334ce01bbb66503998f74a76a69aeb6e69dabf03 /ppapi/c | |
parent | 955cf1fc7b1d9bdb0e8173e518dbb959e01ea7d5 (diff) | |
download | chromium_src-d98104317f904eb9282bbc69596ae2feb9df0bf6.zip chromium_src-d98104317f904eb9282bbc69596ae2feb9df0bf6.tar.gz chromium_src-d98104317f904eb9282bbc69596ae2feb9df0bf6.tar.bz2 |
Implement PPB_TCPSocket_Dev: part 2
This CL:
- adds apps permission check;
- supports TCP socket options that PPB_TCPSocket_Private doesn't support;
- map net::Error to PP_Error.
BUG=247225
TEST=None
Review URL: https://chromiumcodereview.appspot.com/17291003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/dev/ppb_tcp_socket_dev.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ppapi/c/dev/ppb_tcp_socket_dev.h b/ppapi/c/dev/ppb_tcp_socket_dev.h index d59bc31..044a03e 100644 --- a/ppapi/c/dev/ppb_tcp_socket_dev.h +++ b/ppapi/c/dev/ppb_tcp_socket_dev.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From dev/ppb_tcp_socket_dev.idl modified Wed Jun 12 11:16:37 2013. */ +/* From dev/ppb_tcp_socket_dev.idl modified Tue Jun 18 15:48:42 2013. */ #ifndef PPAPI_C_DEV_PPB_TCP_SOCKET_DEV_H_ #define PPAPI_C_DEV_PPB_TCP_SOCKET_DEV_H_ @@ -31,16 +31,19 @@ */ typedef enum { /* Disables coalescing of small writes to make TCP segments, and instead - * deliver data immediately. Value type is PP_VARTYPE_BOOL. */ + * deliver data immediately. Value type is PP_VARTYPE_BOOL. + * This option can only be set after a successful Connect() call. */ PP_TCPSOCKET_OPTION_NO_DELAY = 0, /* Specifies the socket send buffer in bytes. Value's type should be * PP_VARTYPE_INT32. + * This option can only be set after a successful Connect() call. * Note: This is only treated as a hint for the browser to set the buffer * size. Even if SetOption() reports that this option has been successfully * set, the browser doesn't guarantee to conform to it. */ PP_TCPSOCKET_OPTION_SEND_BUFFER_SIZE = 1, /* Specifies the socket receive buffer in bytes. Value's type should be * PP_VARTYPE_INT32. + * This option can only be set after a successful Connect() call. * Note: This is only treated as a hint for the browser to set the buffer * size. Even if SetOption() reports that this option has been successfully * set, the browser doesn't guarantee to conform to it. */ @@ -119,7 +122,7 @@ struct PPB_TCPSocket_Dev_0_1 { * Sets an option on |tcp_socket|. Supported |name| and |value| parameters * are as described for PP_TCPSocketOption_Dev. |callback| will be * invoked with PP_OK if setting the option succeeds, or an error code - * otherwise. The socket must be connected before SetOption is called. + * otherwise. */ int32_t (*SetOption)(PP_Resource tcp_socket, PP_TCPSocket_Option_Dev name, |