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

Unified Diff: content/browser/renderer_host/p2p/socket_host_tcp_server.cc

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_server.cc
===================================================================
--- content/browser/renderer_host/p2p/socket_host_tcp_server.cc (revision 205587)
+++ content/browser/renderer_host/p2p/socket_host_tcp_server.cc (working copy)
@@ -21,7 +21,7 @@
namespace content {
P2PSocketHostTcpServer::P2PSocketHostTcpServer(
- IPC::Sender* message_sender, int id, P2PSocketType client_type)
+ IPC::Sender* message_sender, int id, P2PSocketType client_type, bool ssl)
: P2PSocketHost(message_sender, id),
client_type_(client_type),
socket_(new net::TCPServerSocket(NULL, net::NetLog::Source())),
@@ -131,9 +131,13 @@
scoped_ptr<P2PSocketHostTcpBase> result;
if (client_type_ == P2P_SOCKET_TCP_CLIENT) {
- result.reset(new P2PSocketHostTcp(message_sender_, id));
- } else {
- result.reset(new P2PSocketHostStunTcp(message_sender_, id));
+ result.reset(new P2PSocketHostTcp(message_sender_, id, false));
+ } else if (client_type_ == P2P_SOCKET_STUN_TCP_CLIENT) {
+ result.reset(new P2PSocketHostStunTcp(message_sender_, id, false));
+ } else if (client_type_ == P2P_SOCKET_SSLTCP_CLIENT) {
+ result.reset(new P2PSocketHostTcp(message_sender_, id, true));
+ } else if (client_type_ == P2P_SOCKET_STUN_SSLTCP_CLIENT) {
+ result.reset(new P2PSocketHostStunTcp(message_sender_, id, true));
}
if (!result->InitAccepted(remote_address, socket))
return NULL;

Powered by Google App Engine
This is Rietveld 408576698