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

Unified Diff: extensions/common/api/sockets_tcp.idl

Issue 76403004: An implementation of chrome.socket.secure(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Morning LKGR Rebase. Created 6 years, 5 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 | « extensions/common/api/socket.idl ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/api/sockets_tcp.idl
diff --git a/extensions/common/api/sockets_tcp.idl b/extensions/common/api/sockets_tcp.idl
index 0fd80957f4a69dc5802964267cda3a00c89ea2c9..e09050dd136d0f1e822bc3d6ba053c5a18217739 100644
--- a/extensions/common/api/sockets_tcp.idl
+++ b/extensions/common/api/sockets_tcp.idl
@@ -80,6 +80,20 @@ namespace sockets.tcp {
// A negative value indicates an error.
callback SetNoDelayCallback = void (long result);
+ dictionary TLSVersionConstraints {
+ // The minimum and maximum acceptable versions of TLS. These will
+ // be <code>ssl3</code>, <code>tls1</code>, <code>tls1.1</code>,
+ // or <code>tls1.2</code>.
+ DOMString? min;
+ DOMString? max;
+ };
+
+ dictionary SecureOptions {
+ TLSVersionConstraints? tlsVersion;
+ };
+
+ callback SecureCallback = void (long result);
+
// Result of the <code>getInfo</code> method.
dictionary SocketInfo {
// The socket identifier.
@@ -209,6 +223,14 @@ namespace sockets.tcp {
static void disconnect(long socketId,
optional DisconnectCallback callback);
+ // Start a TLS client connection over the connected TCP client socket.
+ // |socketId| : The existing, connected socket to use.
+ // |options| : Constraints and parameters for the TLS connection.
+ // |callback| : Called when the connection attempt is complete.
+ static void secure(long socketId,
+ optional SecureOptions options,
+ SecureCallback callback);
+
// Sends data on the given TCP socket.
// |socketId| : The socket identifier.
// |data| : The data to send.
« no previous file with comments | « extensions/common/api/socket.idl ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698