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

Unified Diff: content/browser/renderer_host/p2p/socket_host_tcp.h

Issue 16516003: SSLTCP (pseudo-SSL with fake handshake and unencrypted data) support for p2p socket. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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: content/browser/renderer_host/p2p/socket_host_tcp.h
===================================================================
--- content/browser/renderer_host/p2p/socket_host_tcp.h (revision 205587)
+++ content/browser/renderer_host/p2p/socket_host_tcp.h (working copy)
@@ -25,9 +25,11 @@
namespace content {
+class SsltcpHelper;
+
class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost {
public:
- P2PSocketHostTcpBase(IPC::Sender* message_sender, int id);
+ P2PSocketHostTcpBase(IPC::Sender* message_sender, int id, bool ssl);
Sergey Ulanov 2013/06/18 20:01:26 can you please define some enum (e.g. SslMode) wit
Ronghua Wu (Left Chromium) 2013/06/18 22:19:48 Reused P2PSocketType.
virtual ~P2PSocketHostTcpBase();
bool InitAccepted(const net::IPEndPoint& remote_address,
@@ -51,6 +53,12 @@
void OnPacket(const std::vector<char>& data);
void OnError();
+ int MaybeHandleSslHello(char** cur, int* cur_len, int* consumed);
+
+ scoped_ptr<SsltcpHelper> ssltcp_helper_;
Sergey Ulanov 2013/06/18 20:01:26 does this need to be protected? I think P2PSocketH
+
+ net::IPEndPoint remote_address_;
Sergey Ulanov 2013/06/18 20:01:26 This still can private.
+
private:
friend class P2PSocketHostTcpTest;
friend class P2PSocketHostTcpServerTest;
@@ -67,8 +75,6 @@
void OnRead(int result);
void OnWritten(int result);
- net::IPEndPoint remote_address_;
-
scoped_ptr<net::StreamSocket> socket_;
scoped_refptr<net::GrowableIOBuffer> read_buffer_;
std::queue<scoped_refptr<net::DrainableIOBuffer> > write_queue_;
@@ -83,7 +89,7 @@
class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHostTcpBase {
public:
- P2PSocketHostTcp(IPC::Sender* message_sender, int id);
+ P2PSocketHostTcp(IPC::Sender* message_sender, int id, bool ssl);
virtual ~P2PSocketHostTcp();
protected:
@@ -100,7 +106,7 @@
// Formatting of messages is defined in RFC5766.
class CONTENT_EXPORT P2PSocketHostStunTcp : public P2PSocketHostTcpBase {
public:
- P2PSocketHostStunTcp(IPC::Sender* message_sender, int id);
+ P2PSocketHostStunTcp(IPC::Sender* message_sender, int id, bool ssl);
virtual ~P2PSocketHostStunTcp();
protected:

Powered by Google App Engine
This is Rietveld 408576698