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

Unified Diff: extensions/browser/api/sockets_tcp/sockets_tcp_api.h

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/api/socket/tls_socket.cc ('k') | extensions/browser/api/sockets_tcp/sockets_tcp_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/sockets_tcp/sockets_tcp_api.h
diff --git a/extensions/browser/api/sockets_tcp/sockets_tcp_api.h b/extensions/browser/api/sockets_tcp/sockets_tcp_api.h
index 8195ca4a7480946a66d657b16b545cf14dcd1eec..94cc49164a720bcd10838341f9b86c4191c2b86f 100644
--- a/extensions/browser/api/sockets_tcp/sockets_tcp_api.h
+++ b/extensions/browser/api/sockets_tcp/sockets_tcp_api.h
@@ -10,6 +10,7 @@
namespace extensions {
class ResumableTCPSocket;
+class TLSSocket;
}
namespace extensions {
@@ -238,6 +239,29 @@ class SocketsTcpGetSocketsFunction : public TCPSocketAsyncApiFunction {
virtual void Work() OVERRIDE;
};
+class SocketsTcpSecureFunction : public TCPSocketAsyncApiFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("sockets.tcp.secure", SOCKETS_TCP_SECURE);
+
+ SocketsTcpSecureFunction();
+
+ protected:
+ virtual ~SocketsTcpSecureFunction();
+ virtual bool Prepare() OVERRIDE;
+ virtual void AsyncWorkStart() OVERRIDE;
+
+ private:
+ virtual void TlsConnectDone(scoped_ptr<extensions::TLSSocket> sock,
+ int result);
+
+ bool paused_;
+ bool persistent_;
+ scoped_ptr<sockets_tcp::Secure::Params> params_;
+ scoped_refptr<net::URLRequestContextGetter> url_request_getter_;
+
+ DISALLOW_COPY_AND_ASSIGN(SocketsTcpSecureFunction);
+};
+
} // namespace core_api
} // namespace extensions
« no previous file with comments | « extensions/browser/api/socket/tls_socket.cc ('k') | extensions/browser/api/sockets_tcp/sockets_tcp_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698