| OLD | NEW |
| 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 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <certt.h> | 9 #include <certt.h> |
| 10 #include <keyt.h> | 10 #include <keyt.h> |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 #endif | 193 #endif |
| 194 // NSS calls this when handshake is completed. We pass 'this' as the second | 194 // NSS calls this when handshake is completed. We pass 'this' as the second |
| 195 // argument. | 195 // argument. |
| 196 static void HandshakeCallback(PRFileDesc* socket, void* arg); | 196 static void HandshakeCallback(PRFileDesc* socket, void* arg); |
| 197 | 197 |
| 198 static SECStatus NextProtoCallback(void* arg, | 198 static SECStatus NextProtoCallback(void* arg, |
| 199 PRFileDesc* fd, | 199 PRFileDesc* fd, |
| 200 const unsigned char* protos, | 200 const unsigned char* protos, |
| 201 unsigned int protos_len, | 201 unsigned int protos_len, |
| 202 unsigned char* proto_out, | 202 unsigned char* proto_out, |
| 203 unsigned int* proto_out_len); | 203 unsigned int* proto_out_len, |
| 204 unsigned int proto_max_len); |
| 204 | 205 |
| 205 // The following methods are for debugging bug 65948. Will remove this code | 206 // The following methods are for debugging bug 65948. Will remove this code |
| 206 // after fixing bug 65948. | 207 // after fixing bug 65948. |
| 207 void EnsureThreadIdAssigned() const; | 208 void EnsureThreadIdAssigned() const; |
| 208 bool CalledOnValidThread() const; | 209 bool CalledOnValidThread() const; |
| 209 | 210 |
| 210 bool transport_send_busy_; | 211 bool transport_send_busy_; |
| 211 bool transport_recv_busy_; | 212 bool transport_recv_busy_; |
| 212 // corked_ is true if we are currently suspending writes to the network. This | 213 // corked_ is true if we are currently suspending writes to the network. This |
| 213 // is named after the similar kernel flag, TCP_CORK. | 214 // is named after the similar kernel flag, TCP_CORK. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // Added the following code Debugging in release mode. | 309 // Added the following code Debugging in release mode. |
| 309 mutable base::Lock lock_; | 310 mutable base::Lock lock_; |
| 310 // This is mutable so that CalledOnValidThread can set it. | 311 // This is mutable so that CalledOnValidThread can set it. |
| 311 // It's guarded by |lock_|. | 312 // It's guarded by |lock_|. |
| 312 mutable base::PlatformThreadId valid_thread_id_; | 313 mutable base::PlatformThreadId valid_thread_id_; |
| 313 }; | 314 }; |
| 314 | 315 |
| 315 } // namespace net | 316 } // namespace net |
| 316 | 317 |
| 317 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ | 318 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ |
| OLD | NEW |