OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_client_socket_win.h" | 5 #include "net/socket/ssl_client_socket_win.h" |
6 | 6 |
7 #include <schnlsp.h> | 7 #include <schnlsp.h> |
8 | 8 |
9 #include "base/lock.h" | 9 #include "base/lock.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 next_state_ = STATE_PAYLOAD_ENCRYPT; | 573 next_state_ = STATE_PAYLOAD_ENCRYPT; |
574 int rv = DoLoop(OK); | 574 int rv = DoLoop(OK); |
575 if (rv == ERR_IO_PENDING) { | 575 if (rv == ERR_IO_PENDING) { |
576 user_callback_ = callback; | 576 user_callback_ = callback; |
577 } else { | 577 } else { |
578 user_buf_ = NULL; | 578 user_buf_ = NULL; |
579 } | 579 } |
580 return rv; | 580 return rv; |
581 } | 581 } |
582 | 582 |
| 583 bool SSLClientSocketWin::SetReceiveBufferSize(int32 size) { |
| 584 return transport_->SetReceiveBufferSize(size); |
| 585 } |
| 586 |
| 587 bool SSLClientSocketWin::SetSendBufferSize(int32 size) { |
| 588 return transport_->SetSendBufferSize(size); |
| 589 } |
| 590 |
583 void SSLClientSocketWin::DoCallback(int rv) { | 591 void SSLClientSocketWin::DoCallback(int rv) { |
584 DCHECK(rv != ERR_IO_PENDING); | 592 DCHECK(rv != ERR_IO_PENDING); |
585 DCHECK(user_callback_); | 593 DCHECK(user_callback_); |
586 | 594 |
587 // since Run may result in Read being called, clear user_callback_ up front. | 595 // since Run may result in Read being called, clear user_callback_ up front. |
588 CompletionCallback* c = user_callback_; | 596 CompletionCallback* c = user_callback_; |
589 user_callback_ = NULL; | 597 user_callback_ = NULL; |
590 user_buf_ = NULL; | 598 user_buf_ = NULL; |
591 c->Run(rv); | 599 c->Run(rv); |
592 } | 600 } |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 } | 1204 } |
1197 } | 1205 } |
1198 | 1206 |
1199 void SSLClientSocketWin::FreeSendBuffer() { | 1207 void SSLClientSocketWin::FreeSendBuffer() { |
1200 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); | 1208 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); |
1201 DCHECK(status == SEC_E_OK); | 1209 DCHECK(status == SEC_E_OK); |
1202 memset(&send_buffer_, 0, sizeof(send_buffer_)); | 1210 memset(&send_buffer_, 0, sizeof(send_buffer_)); |
1203 } | 1211 } |
1204 | 1212 |
1205 } // namespace net | 1213 } // namespace net |
OLD | NEW |