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

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

Issue 217573002: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo on Linux 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 #include "net/socket/ssl_server_socket_nss.h" 5 #include "net/socket/ssl_server_socket_nss.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <winsock2.h> 8 #include <winsock2.h>
9 #endif 9 #endif
10 10
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 if (rv == ERR_IO_PENDING) { 232 if (rv == ERR_IO_PENDING) {
233 user_write_callback_ = callback; 233 user_write_callback_ = callback;
234 } else { 234 } else {
235 user_write_buf_ = NULL; 235 user_write_buf_ = NULL;
236 user_write_buf_len_ = 0; 236 user_write_buf_len_ = 0;
237 } 237 }
238 return rv; 238 return rv;
239 } 239 }
240 240
241 bool SSLServerSocketNSS::SetReceiveBufferSize(int32 size) { 241 int SSLServerSocketNSS::SetReceiveBufferSize(int32 size) {
242 return transport_socket_->SetReceiveBufferSize(size); 242 return transport_socket_->SetReceiveBufferSize(size);
243 } 243 }
244 244
245 bool SSLServerSocketNSS::SetSendBufferSize(int32 size) { 245 int SSLServerSocketNSS::SetSendBufferSize(int32 size) {
246 return transport_socket_->SetSendBufferSize(size); 246 return transport_socket_->SetSendBufferSize(size);
247 } 247 }
248 248
249 bool SSLServerSocketNSS::IsConnected() const { 249 bool SSLServerSocketNSS::IsConnected() const {
250 return completed_handshake_; 250 return completed_handshake_;
251 } 251 }
252 252
253 void SSLServerSocketNSS::Disconnect() { 253 void SSLServerSocketNSS::Disconnect() {
254 transport_socket_->Disconnect(); 254 transport_socket_->Disconnect();
255 } 255 }
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 // initializes the NSS base library. 832 // initializes the NSS base library.
833 EnsureNSSSSLInit(); 833 EnsureNSSSSLInit();
834 if (!NSS_IsInitialized()) 834 if (!NSS_IsInitialized())
835 return ERR_UNEXPECTED; 835 return ERR_UNEXPECTED;
836 836
837 EnableSSLServerSockets(); 837 EnableSSLServerSockets();
838 return OK; 838 return OK;
839 } 839 }
840 840
841 } // namespace net 841 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698