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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_tcp.cc

Issue 135373002: Added SSLHostInfo. Storing of server host info to our standard disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed wtc's comments Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/p2p/socket_host_tcp.h" 5 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
6 6
7 #include "base/sys_byteorder.h" 7 #include "base/sys_byteorder.h"
8 #include "content/common/p2p_messages.h" 8 #include "content/common/p2p_messages.h"
9 #include "ipc/ipc_sender.h" 9 #include "ipc/ipc_sender.h"
10 #include "jingle/glue/fake_ssl_client_socket.h" 10 #include "jingle/glue/fake_ssl_client_socket.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // Default ssl config. 173 // Default ssl config.
174 const net::SSLConfig ssl_config; 174 const net::SSLConfig ssl_config;
175 net::HostPortPair dest_host_port_pair = 175 net::HostPortPair dest_host_port_pair =
176 net::HostPortPair::FromIPEndPoint(remote_address_); 176 net::HostPortPair::FromIPEndPoint(remote_address_);
177 net::ClientSocketFactory* socket_factory = 177 net::ClientSocketFactory* socket_factory =
178 net::ClientSocketFactory::GetDefaultFactory(); 178 net::ClientSocketFactory::GetDefaultFactory();
179 DCHECK(socket_factory); 179 DCHECK(socket_factory);
180 180
181 socket_ = socket_factory->CreateSSLClientSocket( 181 socket_ = socket_factory->CreateSSLClientSocket(
182 socket_handle.Pass(), dest_host_port_pair, ssl_config, context); 182 socket_handle.Pass(), dest_host_port_pair, ssl_config, NULL, context);
183 int status = socket_->Connect( 183 int status = socket_->Connect(
184 base::Bind(&P2PSocketHostTcpBase::ProcessTlsSslConnectDone, 184 base::Bind(&P2PSocketHostTcpBase::ProcessTlsSslConnectDone,
185 base::Unretained(this))); 185 base::Unretained(this)));
186 if (status != net::ERR_IO_PENDING) { 186 if (status != net::ERR_IO_PENDING) {
187 ProcessTlsSslConnectDone(status); 187 ProcessTlsSslConnectDone(status);
188 } 188 }
189 } 189 }
190 190
191 void P2PSocketHostTcpBase::ProcessTlsSslConnectDone(int status) { 191 void P2PSocketHostTcpBase::ProcessTlsSslConnectDone(int status) {
192 DCHECK_NE(status, net::ERR_IO_PENDING); 192 DCHECK_NE(status, net::ERR_IO_PENDING);
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } else { 529 } else {
530 packet_size += kTurnChannelDataHeaderSize; 530 packet_size += kTurnChannelDataHeaderSize;
531 // Calculate any padding if present. 531 // Calculate any padding if present.
532 if (packet_size % 4) 532 if (packet_size % 4)
533 *pad_bytes = 4 - packet_size % 4; 533 *pad_bytes = 4 - packet_size % 4;
534 } 534 }
535 return packet_size; 535 return packet_size;
536 } 536 }
537 537
538 } // namespace content 538 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698