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

Side by Side Diff: net/socket/ssl_client_socket_openssl.cc

Issue 6930014: Rename ClientSocket to StreamSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/socket/ssl_client_socket_openssl.h ('k') | net/socket/ssl_client_socket_pool.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // OpenSSL binding for SSLClientSocket. The class layout and general principle 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle
6 // of operation is derived from SSLClientSocketNSS. 6 // of operation is derived from SSLClientSocketNSS.
7 7
8 #include "net/socket/ssl_client_socket_openssl.h" 8 #include "net/socket/ssl_client_socket_openssl.h"
9 9
10 #include <openssl/ssl.h> 10 #include <openssl/ssl.h>
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 void SSLClientSocketOpenSSL::DoWriteCallback(int rv) { 615 void SSLClientSocketOpenSSL::DoWriteCallback(int rv) {
616 // Since Run may result in Write being called, clear |user_write_callback_| 616 // Since Run may result in Write being called, clear |user_write_callback_|
617 // up front. 617 // up front.
618 CompletionCallback* c = user_write_callback_; 618 CompletionCallback* c = user_write_callback_;
619 user_write_callback_ = NULL; 619 user_write_callback_ = NULL;
620 user_write_buf_ = NULL; 620 user_write_buf_ = NULL;
621 user_write_buf_len_ = 0; 621 user_write_buf_len_ = 0;
622 c->Run(rv); 622 c->Run(rv);
623 } 623 }
624 624
625 // ClientSocket methods 625 // StreamSocket methods
626 626
627 int SSLClientSocketOpenSSL::Connect(CompletionCallback* callback) { 627 int SSLClientSocketOpenSSL::Connect(CompletionCallback* callback) {
628 net_log_.BeginEvent(NetLog::TYPE_SSL_CONNECT, NULL); 628 net_log_.BeginEvent(NetLog::TYPE_SSL_CONNECT, NULL);
629 629
630 // Set up new ssl object. 630 // Set up new ssl object.
631 if (!Init()) { 631 if (!Init()) {
632 int result = ERR_UNEXPECTED; 632 int result = ERR_UNEXPECTED;
633 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, result); 633 net_log_.EndEventWithNetErrorCode(NetLog::TYPE_SSL_CONNECT, result);
634 return result; 634 return result;
635 } 635 }
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 int rv = SSL_write(ssl_, user_write_buf_->data(), user_write_buf_len_); 1188 int rv = SSL_write(ssl_, user_write_buf_->data(), user_write_buf_len_);
1189 1189
1190 if (rv >= 0) 1190 if (rv >= 0)
1191 return rv; 1191 return rv;
1192 1192
1193 int err = SSL_get_error(ssl_, rv); 1193 int err = SSL_get_error(ssl_, rv);
1194 return MapOpenSSLError(err, err_tracer); 1194 return MapOpenSSLError(err, err_tracer);
1195 } 1195 }
1196 1196
1197 } // namespace net 1197 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.h ('k') | net/socket/ssl_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698