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

Unified Diff: chrome/browser/extensions/api/socket/socket_api.h

Issue 10580028: Experimental support for SSL in platform apps sockets. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Created 8 years, 6 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/browser/extensions/api/socket/socket_api.h
diff --git a/chrome/browser/extensions/api/socket/socket_api.h b/chrome/browser/extensions/api/socket/socket_api.h
index b3d26bd82923f867eeff25d0b2441573cf4c72f8..9ccfb395e67958696840a13a81b8774c79075b4e 100644
--- a/chrome/browser/extensions/api/socket/socket_api.h
+++ b/chrome/browser/extensions/api/socket/socket_api.h
@@ -73,7 +73,8 @@ class SocketCreateFunction : public SocketExtensionFunction {
enum SocketType {
kSocketTypeInvalid = -1,
kSocketTypeTCP,
- kSocketTypeUDP
+ kSocketTypeUDP,
+ kSocketTypeSSL
};
SocketType socket_type_;
@@ -121,6 +122,24 @@ class SocketConnectFunction : public SocketExtensionWithDnsLookupFunction {
int port_;
};
+class SocketHandshakeFunction : public SocketExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.handshake")
+
+ protected:
+ virtual ~SocketHandshakeFunction() {}
+
+ // AsyncAPIFunction:
+ virtual bool Prepare() OVERRIDE;
+ virtual void AsyncWorkStart() OVERRIDE;
+ void OnCompleted(int result);
+
+ private:
+ int socket_id_;
+ std::string ssl_hostname_;
+ int ssl_port_;
+};
+
class SocketDisconnectFunction : public SocketExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("experimental.socket.disconnect")

Powered by Google App Engine
This is Rietveld 408576698