| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/base/ssl_client_socket_nss.h" | 5 #include "net/base/ssl_client_socket_nss.h" |
| 6 | 6 |
| 7 #include <nspr.h> | 7 #include <nspr.h> |
| 8 #include <nss.h> | 8 #include <nss.h> |
| 9 #include <secerr.h> | 9 #include <secerr.h> |
| 10 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 | 10 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 NOTREACHED() << "unexpected state"; | 393 NOTREACHED() << "unexpected state"; |
| 394 break; | 394 break; |
| 395 } | 395 } |
| 396 | 396 |
| 397 // Do the actual network I/O | 397 // Do the actual network I/O |
| 398 if (nss_bufs_ != NULL) { | 398 if (nss_bufs_ != NULL) { |
| 399 int nsent = BufferSend(); | 399 int nsent = BufferSend(); |
| 400 int nreceived = BufferRecv(); | 400 int nreceived = BufferRecv(); |
| 401 network_moved = (nsent > 0 || nreceived >= 0); | 401 network_moved = (nsent > 0 || nreceived >= 0); |
| 402 } | 402 } |
| 403 } while ((rv != ERR_IO_PENDING || network_moved) && next_state_ != STATE_NONE)
; | 403 } while ((rv != ERR_IO_PENDING || network_moved) && |
| 404 next_state_ != STATE_NONE); |
| 404 LeaveFunction(""); | 405 LeaveFunction(""); |
| 405 return rv; | 406 return rv; |
| 406 } | 407 } |
| 407 | 408 |
| 408 int SSLClientSocketNSS::DoConnect() { | 409 int SSLClientSocketNSS::DoConnect() { |
| 409 EnterFunction(""); | 410 EnterFunction(""); |
| 410 GotoState(STATE_CONNECT_COMPLETE); | 411 GotoState(STATE_CONNECT_COMPLETE); |
| 411 return transport_->Connect(&io_callback_); | 412 return transport_->Connect(&io_callback_); |
| 412 } | 413 } |
| 413 | 414 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 GotoState(STATE_PAYLOAD_WRITE); | 580 GotoState(STATE_PAYLOAD_WRITE); |
| 580 return ERR_IO_PENDING; | 581 return ERR_IO_PENDING; |
| 581 } | 582 } |
| 582 user_buf_ = NULL; | 583 user_buf_ = NULL; |
| 583 LeaveFunction(""); | 584 LeaveFunction(""); |
| 584 return NetErrorFromNSPRError(prerr); | 585 return NetErrorFromNSPRError(prerr); |
| 585 } | 586 } |
| 586 | 587 |
| 587 } // namespace net | 588 } // namespace net |
| 588 | 589 |
| OLD | NEW |