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

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

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux typo Created 6 years, 8 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 // 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/err.h> 10 #include <openssl/err.h>
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 } else { 771 } else {
772 if (rv > 0) 772 if (rv > 0)
773 was_ever_used_ = true; 773 was_ever_used_ = true;
774 user_write_buf_ = NULL; 774 user_write_buf_ = NULL;
775 user_write_buf_len_ = 0; 775 user_write_buf_len_ = 0;
776 } 776 }
777 777
778 return rv; 778 return rv;
779 } 779 }
780 780
781 bool SSLClientSocketOpenSSL::SetReceiveBufferSize(int32 size) { 781 int SSLClientSocketOpenSSL::SetReceiveBufferSize(int32 size) {
782 return transport_->socket()->SetReceiveBufferSize(size); 782 return transport_->socket()->SetReceiveBufferSize(size);
783 } 783 }
784 784
785 bool SSLClientSocketOpenSSL::SetSendBufferSize(int32 size) { 785 int SSLClientSocketOpenSSL::SetSendBufferSize(int32 size) {
786 return transport_->socket()->SetSendBufferSize(size); 786 return transport_->socket()->SetSendBufferSize(size);
787 } 787 }
788 788
789 bool SSLClientSocketOpenSSL::Init() { 789 bool SSLClientSocketOpenSSL::Init() {
790 DCHECK(!ssl_); 790 DCHECK(!ssl_);
791 DCHECK(!transport_bio_); 791 DCHECK(!transport_bio_);
792 792
793 SSLContext* context = SSLContext::GetInstance(); 793 SSLContext* context = SSLContext::GetInstance();
794 crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); 794 crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
795 795
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 #endif 1578 #endif
1579 return SSL_TLSEXT_ERR_OK; 1579 return SSL_TLSEXT_ERR_OK;
1580 } 1580 }
1581 1581
1582 scoped_refptr<X509Certificate> 1582 scoped_refptr<X509Certificate>
1583 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { 1583 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const {
1584 return server_cert_; 1584 return server_cert_;
1585 } 1585 }
1586 1586
1587 } // namespace net 1587 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698