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

Side by Side Diff: net/socket/ssl_client_socket_nss.h

Issue 10014010: net: False Start only for NPN capable servers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // takes ownership of the |*cert| and |*key|. 140 // takes ownership of the |*cert| and |*key|.
141 int ImportDBCertAndKey(CERTCertificate** cert, SECKEYPrivateKey** key); 141 int ImportDBCertAndKey(CERTCertificate** cert, SECKEYPrivateKey** key);
142 int DoGetDBCertComplete(int result); 142 int DoGetDBCertComplete(int result);
143 int DoVerifyDNSSEC(int result); 143 int DoVerifyDNSSEC(int result);
144 int DoVerifyCert(int result); 144 int DoVerifyCert(int result);
145 int DoVerifyCertComplete(int result); 145 int DoVerifyCertComplete(int result);
146 int DoPayloadRead(); 146 int DoPayloadRead();
147 int DoPayloadWrite(); 147 int DoPayloadWrite();
148 void LogConnectionTypeMetrics() const; 148 void LogConnectionTypeMetrics() const;
149 void SaveSSLHostInfo(); 149 void SaveSSLHostInfo();
150 void UncorkAfterTimeout();
wtc 2012/04/17 22:46:09 It seems that the corking code is still useful to
151 150
152 bool DoTransportIO(); 151 bool DoTransportIO();
153 int BufferSend(void); 152 int BufferSend(void);
154 void BufferSendComplete(int result); 153 void BufferSendComplete(int result);
155 int BufferRecv(void); 154 int BufferRecv(void);
156 void BufferRecvComplete(int result); 155 void BufferRecvComplete(int result);
157 156
158 // Handles an NSS error generated while handshaking or performing IO. 157 // Handles an NSS error generated while handshaking or performing IO.
159 // Returns a network error code mapped from the original NSS error. 158 // Returns a network error code mapped from the original NSS error.
160 int HandleNSSError(PRErrorCode error, bool handshake_error); 159 int HandleNSSError(PRErrorCode error, bool handshake_error);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 unsigned int* proto_out_len, 203 unsigned int* proto_out_len,
205 unsigned int proto_max_len); 204 unsigned int proto_max_len);
206 205
207 // 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
208 // after fixing bug 65948. 207 // after fixing bug 65948.
209 void EnsureThreadIdAssigned() const; 208 void EnsureThreadIdAssigned() const;
210 bool CalledOnValidThread() const; 209 bool CalledOnValidThread() const;
211 210
212 bool transport_send_busy_; 211 bool transport_send_busy_;
213 bool transport_recv_busy_; 212 bool transport_recv_busy_;
214 // corked_ is true if we are currently suspending writes to the network. This
215 // is named after the similar kernel flag, TCP_CORK.
216 bool corked_;
217 // uncork_timer_ is used to limit the amount of time that we'll delay the
218 // Finished message while waiting for a Write.
219 base::OneShotTimer<SSLClientSocketNSS> uncork_timer_;
220 scoped_refptr<IOBuffer> recv_buffer_; 213 scoped_refptr<IOBuffer> recv_buffer_;
221 214
222 scoped_ptr<ClientSocketHandle> transport_; 215 scoped_ptr<ClientSocketHandle> transport_;
223 HostPortPair host_and_port_; 216 HostPortPair host_and_port_;
224 SSLConfig ssl_config_; 217 SSLConfig ssl_config_;
225 218
226 CompletionCallback user_connect_callback_; 219 CompletionCallback user_connect_callback_;
227 CompletionCallback user_read_callback_; 220 CompletionCallback user_read_callback_;
228 CompletionCallback user_write_callback_; 221 CompletionCallback user_write_callback_;
229 222
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // Added the following code Debugging in release mode. 303 // Added the following code Debugging in release mode.
311 mutable base::Lock lock_; 304 mutable base::Lock lock_;
312 // This is mutable so that CalledOnValidThread can set it. 305 // This is mutable so that CalledOnValidThread can set it.
313 // It's guarded by |lock_|. 306 // It's guarded by |lock_|.
314 mutable base::PlatformThreadId valid_thread_id_; 307 mutable base::PlatformThreadId valid_thread_id_;
315 }; 308 };
316 309
317 } // namespace net 310 } // namespace net
318 311
319 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_ 312 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_NSS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698