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

Unified Diff: chrome/common/extensions/api/socket.idl

Issue 76403004: An implementation of chrome.socket.secure(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: An un-DCHECK-ification, a new test, a test clarification, and a lot of nit-double-spaces. Created 6 years, 9 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: chrome/common/extensions/api/socket.idl
diff --git a/chrome/common/extensions/api/socket.idl b/chrome/common/extensions/api/socket.idl
index 5b76525352e0cf564682d8f25b2dcb06988b5acb..283aa6accc40c9205ca8cfc65d0aaed556800894 100644
--- a/chrome/common/extensions/api/socket.idl
+++ b/chrome/common/extensions/api/socket.idl
@@ -27,6 +27,8 @@ namespace socket {
callback ListenCallback = void (long result);
+ callback SecureCallback = void (long result);
+
dictionary AcceptInfo {
long resultCode;
// The id of the accepted socket.
@@ -107,6 +109,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);
@@ -332,6 +346,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 the 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);
};
};

Powered by Google App Engine
This is Rietveld 408576698