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

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

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_OPENSSL_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 virtual const BoundNetLog& NetLog() const; 73 virtual const BoundNetLog& NetLog() const;
74 virtual void SetSubresourceSpeculation(); 74 virtual void SetSubresourceSpeculation();
75 virtual void SetOmniboxSpeculation(); 75 virtual void SetOmniboxSpeculation();
76 virtual bool WasEverUsed() const; 76 virtual bool WasEverUsed() const;
77 virtual bool UsingTCPFastOpen() const; 77 virtual bool UsingTCPFastOpen() const;
78 virtual int64 NumBytesRead() const; 78 virtual int64 NumBytesRead() const;
79 virtual base::TimeDelta GetConnectTimeMicros() const; 79 virtual base::TimeDelta GetConnectTimeMicros() const;
80 80
81 // Socket implementation. 81 // Socket implementation.
82 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); 82 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
83 virtual int Read(IOBuffer* buf, int buf_len,
84 const CompletionCallback& callback);
83 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) ; 85 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) ;
84 virtual bool SetReceiveBufferSize(int32 size); 86 virtual bool SetReceiveBufferSize(int32 size);
85 virtual bool SetSendBufferSize(int32 size); 87 virtual bool SetSendBufferSize(int32 size);
86 88
87 private: 89 private:
88 bool Init(); 90 bool Init();
89 void DoReadCallback(int result); 91 void DoReadCallback(int result);
90 void DoWriteCallback(int result); 92 void DoWriteCallback(int result);
91 93
92 bool DoTransportIO(); 94 bool DoTransportIO();
(...skipping 22 matching lines...) Expand all
115 117
116 OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_send_callback_; 118 OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_send_callback_;
117 OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_recv_callback_; 119 OldCompletionCallbackImpl<SSLClientSocketOpenSSL> buffer_recv_callback_;
118 bool transport_send_busy_; 120 bool transport_send_busy_;
119 scoped_refptr<DrainableIOBuffer> send_buffer_; 121 scoped_refptr<DrainableIOBuffer> send_buffer_;
120 bool transport_recv_busy_; 122 bool transport_recv_busy_;
121 scoped_refptr<IOBuffer> recv_buffer_; 123 scoped_refptr<IOBuffer> recv_buffer_;
122 124
123 OldCompletionCallback* old_user_connect_callback_; 125 OldCompletionCallback* old_user_connect_callback_;
124 CompletionCallback user_connect_callback_; 126 CompletionCallback user_connect_callback_;
125 OldCompletionCallback* user_read_callback_; 127 OldCompletionCallback* old_user_read_callback_;
128 CompletionCallback user_read_callback_;
126 OldCompletionCallback* user_write_callback_; 129 OldCompletionCallback* user_write_callback_;
127 130
128 // Used by Read function. 131 // Used by Read function.
129 scoped_refptr<IOBuffer> user_read_buf_; 132 scoped_refptr<IOBuffer> user_read_buf_;
130 int user_read_buf_len_; 133 int user_read_buf_len_;
131 134
132 // Used by Write function. 135 // Used by Write function.
133 scoped_refptr<IOBuffer> user_write_buf_; 136 scoped_refptr<IOBuffer> user_write_buf_;
134 int user_write_buf_len_; 137 int user_write_buf_len_;
135 138
(...skipping 30 matching lines...) Expand all
166 State next_handshake_state_; 169 State next_handshake_state_;
167 NextProtoStatus npn_status_; 170 NextProtoStatus npn_status_;
168 std::string npn_proto_; 171 std::string npn_proto_;
169 std::string server_protos_; 172 std::string server_protos_;
170 BoundNetLog net_log_; 173 BoundNetLog net_log_;
171 }; 174 };
172 175
173 } // namespace net 176 } // namespace net
174 177
175 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 178 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_client_socket_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698