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

Unified Diff: extensions/common/api/socket.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/browser/extension_function_histogram_value.h ('k') | extensions/common/api/sockets_tcp.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/api/socket.idl
diff --git a/extensions/common/api/socket.idl b/extensions/common/api/socket.idl
index c595817f14e93e15823d8e36ce45c2b63bc16724..641c149f0b5951d8cca138379ee5e87eb9c5c35d 100644
--- a/extensions/common/api/socket.idl
+++ b/extensions/common/api/socket.idl
@@ -29,6 +29,8 @@ namespace socket {
callback ListenCallback = void (long result);
+ callback SecureCallback = void (long result);
+
dictionary AcceptInfo {
long resultCode;
// The id of the accepted socket.
@@ -109,6 +111,18 @@ namespace socket {
long prefixLength;
};
+ 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 RecvFromCallback = void (RecvFromInfo recvFromInfo);
callback SendToCallback = void (WriteInfo writeInfo);
@@ -334,6 +348,14 @@ namespace socket {
// |callback| : Called with an array of strings of the result.
static void getJoinedGroups(long socketId,
GetJoinedGroupsCallback callback);
+
+ // Start a TLS client connection over a connected TCP client socket.
+ // |socketId| : The connected socket to use.
+ // |options| : Constraints and parameters for the TLS connection.
+ // |callback| : Called when the TLS connection attempt is complete.
+ static void secure(long socketId,
+ optional SecureOptions options,
+ SecureCallback callback);
};
};
« no previous file with comments | « extensions/browser/extension_function_histogram_value.h ('k') | extensions/common/api/sockets_tcp.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698