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

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

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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_WIN_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #define SECURITY_WIN32 // Needs to be defined before including security.h 9 #define SECURITY_WIN32 // Needs to be defined before including security.h
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual const BoundNetLog& NetLog() const { return net_log_; } 65 virtual const BoundNetLog& NetLog() const { return net_log_; }
66 virtual void SetSubresourceSpeculation(); 66 virtual void SetSubresourceSpeculation();
67 virtual void SetOmniboxSpeculation(); 67 virtual void SetOmniboxSpeculation();
68 virtual bool WasEverUsed() const; 68 virtual bool WasEverUsed() const;
69 virtual bool UsingTCPFastOpen() const; 69 virtual bool UsingTCPFastOpen() const;
70 virtual int64 NumBytesRead() const; 70 virtual int64 NumBytesRead() const;
71 virtual base::TimeDelta GetConnectTimeMicros() const; 71 virtual base::TimeDelta GetConnectTimeMicros() const;
72 72
73 // Socket implementation. 73 // Socket implementation.
74 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); 74 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback);
75 virtual int Read(IOBuffer* buf, int buf_len,
76 const CompletionCallback& callback);
75 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) ; 77 virtual int Write(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) ;
76 78
77 virtual bool SetReceiveBufferSize(int32 size); 79 virtual bool SetReceiveBufferSize(int32 size);
78 virtual bool SetSendBufferSize(int32 size); 80 virtual bool SetSendBufferSize(int32 size);
79 81
80 private: 82 private:
81 bool completed_handshake() const { 83 bool completed_handshake() const {
82 return next_state_ == STATE_COMPLETED_HANDSHAKE; 84 return next_state_ == STATE_COMPLETED_HANDSHAKE;
83 } 85 }
84 86
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 120
119 scoped_ptr<ClientSocketHandle> transport_; 121 scoped_ptr<ClientSocketHandle> transport_;
120 HostPortPair host_and_port_; 122 HostPortPair host_and_port_;
121 SSLConfig ssl_config_; 123 SSLConfig ssl_config_;
122 124
123 // User function to callback when the Connect() completes. 125 // User function to callback when the Connect() completes.
124 OldCompletionCallback* old_user_connect_callback_; 126 OldCompletionCallback* old_user_connect_callback_;
125 CompletionCallback user_connect_callback_; 127 CompletionCallback user_connect_callback_;
126 128
127 // User function to callback when a Read() completes. 129 // User function to callback when a Read() completes.
128 OldCompletionCallback* user_read_callback_; 130 OldCompletionCallback* old_user_read_callback_;
131 CompletionCallback user_read_callback_;
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 // User function to callback when a Write() completes. 135 // User function to callback when a Write() completes.
133 OldCompletionCallback* user_write_callback_; 136 OldCompletionCallback* user_write_callback_;
134 scoped_refptr<IOBuffer> user_write_buf_; 137 scoped_refptr<IOBuffer> user_write_buf_;
135 int user_write_buf_len_; 138 int user_write_buf_len_;
136 139
137 // Used to Read and Write using transport_. 140 // Used to Read and Write using transport_.
138 scoped_refptr<IOBuffer> transport_read_buf_; 141 scoped_refptr<IOBuffer> transport_read_buf_;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 207
205 // True when the decrypter needs more data in order to decrypt. 208 // True when the decrypter needs more data in order to decrypt.
206 bool need_more_data_; 209 bool need_more_data_;
207 210
208 BoundNetLog net_log_; 211 BoundNetLog net_log_;
209 }; 212 };
210 213
211 } // namespace net 214 } // namespace net
212 215
213 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_ 216 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698