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

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

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 int64 SSLServerSocketNSS::NumBytesRead() const { 240 int64 SSLServerSocketNSS::NumBytesRead() const {
241 return transport_socket_->NumBytesRead(); 241 return transport_socket_->NumBytesRead();
242 } 242 }
243 243
244 base::TimeDelta SSLServerSocketNSS::GetConnectTimeMicros() const { 244 base::TimeDelta SSLServerSocketNSS::GetConnectTimeMicros() const {
245 return transport_socket_->GetConnectTimeMicros(); 245 return transport_socket_->GetConnectTimeMicros();
246 } 246 }
247 247
248 NextProto SSLServerSocketNSS::GetNegotiatedProtocol() const {
249 return transport_socket_->GetNegotiatedProtocol();
250 }
251
248 int SSLServerSocketNSS::InitializeSSLOptions() { 252 int SSLServerSocketNSS::InitializeSSLOptions() {
249 // Transport connected, now hook it up to nss 253 // Transport connected, now hook it up to nss
250 // TODO(port): specify rx and tx buffer sizes separately 254 // TODO(port): specify rx and tx buffer sizes separately
251 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize); 255 nss_fd_ = memio_CreateIOLayer(kRecvBufferSize);
252 if (nss_fd_ == NULL) { 256 if (nss_fd_ == NULL) {
253 return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code. 257 return ERR_OUT_OF_MEMORY; // TODO(port): map NSPR error code.
254 } 258 }
255 259
256 // Grab pointer to buffers 260 // Grab pointer to buffers
257 nss_bufs_ = memio_GetSecret(nss_fd_); 261 nss_bufs_ = memio_GetSecret(nss_fd_);
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 // Initialize the NSS SSL library in a threadsafe way. This also 768 // Initialize the NSS SSL library in a threadsafe way. This also
765 // initializes the NSS base library. 769 // initializes the NSS base library.
766 EnsureNSSSSLInit(); 770 EnsureNSSSSLInit();
767 if (!NSS_IsInitialized()) 771 if (!NSS_IsInitialized())
768 return ERR_UNEXPECTED; 772 return ERR_UNEXPECTED;
769 773
770 return OK; 774 return OK;
771 } 775 }
772 776
773 } // namespace net 777 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698