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

Side by Side Diff: remoting/jingle_glue/ssl_socket_adapter.cc

Issue 3846005: Revert 62918 - net: clean up SSLHostInfo construction.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "remoting/jingle_glue/ssl_socket_adapter.h" 5 #include "remoting/jingle_glue/ssl_socket_adapter.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "net/base/address_list.h" 9 #include "net/base/address_list.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 return net::ERR_UNEXPECTED; 60 return net::ERR_UNEXPECTED;
61 } 61 }
62 62
63 // SSLConfigService is not thread-safe, and the default values for SSLConfig 63 // SSLConfigService is not thread-safe, and the default values for SSLConfig
64 // are correct for us, so we don't use the config service to initialize this 64 // are correct for us, so we don't use the config service to initialize this
65 // object. 65 // object.
66 net::SSLConfig ssl_config; 66 net::SSLConfig ssl_config;
67 transport_socket_->set_addr(talk_base::SocketAddress(hostname_, 0)); 67 transport_socket_->set_addr(talk_base::SocketAddress(hostname_, 0));
68 ssl_socket_.reset( 68 ssl_socket_.reset(
69 net::ClientSocketFactory::GetDefaultFactory()->CreateSSLClientSocket( 69 net::ClientSocketFactory::GetDefaultFactory()->CreateSSLClientSocket(
70 transport_socket_, hostname_.c_str(), ssl_config, 70 transport_socket_, hostname_.c_str(), ssl_config));
71 NULL /* ssl_host_info */));
72 71
73 int result = ssl_socket_->Connect(&connected_callback_); 72 int result = ssl_socket_->Connect(&connected_callback_);
74 73
75 if (result == net::ERR_IO_PENDING || result == net::OK) { 74 if (result == net::ERR_IO_PENDING || result == net::OK) {
76 return 0; 75 return 0;
77 } else { 76 } else {
78 LOG(ERROR) << "Could not start SSL: " << net::ErrorToString(result); 77 LOG(ERROR) << "Could not start SSL: " << net::ErrorToString(result);
79 return result; 78 return result;
80 } 79 }
81 } 80 }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 write_buffer_len_ = buffer_len; 340 write_buffer_len_ = buffer_len;
342 return; 341 return;
343 } 342 }
344 } 343 }
345 was_used_to_convey_data_ = true; 344 was_used_to_convey_data_ = true;
346 callback->RunWithParams(Tuple1<int>(result)); 345 callback->RunWithParams(Tuple1<int>(result));
347 } 346 }
348 } 347 }
349 348
350 } // namespace remoting 349 } // namespace remoting
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698