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

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

Issue 76403004: An implementation of chrome.socket.secure(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: After Renaud's comments. Added a secure() to sockets.tcp. Created 7 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
Index: chrome/common/extensions/api/sockets_tcp.idl
diff --git a/chrome/common/extensions/api/sockets_tcp.idl b/chrome/common/extensions/api/sockets_tcp.idl
index f6cbc5128875da2598784671fc6cb174e1ba7b29..a0e72b9ea4f4379148d2fc381ff68fe990b94c60 100644
--- a/chrome/common/extensions/api/sockets_tcp.idl
+++ b/chrome/common/extensions/api/sockets_tcp.idl
@@ -80,6 +80,17 @@ namespace sockets.tcp {
// A negative value indicates an error.
callback SetNoDelayCallback = void (long result);
+ dictionary TLSVersionConstraints {
+ 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.
@@ -235,6 +246,14 @@ namespace sockets.tcp {
// Retrieves the list of currently opened sockets owned by the application.
// |callback| : Called when the list of sockets is available.
static void getSockets(GetSocketsCallback callback);
+
+ // Start a TLS client connection over the 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);
rpaquay 2013/12/16 20:18:46 nit: can you move this method between "disconnect"
lally 2013/12/16 22:20:07 Done.
};
interface Events {

Powered by Google App Engine
This is Rietveld 408576698