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

Side by Side Diff: net/socket/ssl_client_socket_mac.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_MAC_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 #include <Security/Security.h> 9 #include <Security/Security.h>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void SetOmniboxSpeculation() OVERRIDE; 63 virtual void SetOmniboxSpeculation() OVERRIDE;
64 virtual bool WasEverUsed() const OVERRIDE; 64 virtual bool WasEverUsed() const OVERRIDE;
65 virtual bool UsingTCPFastOpen() const OVERRIDE; 65 virtual bool UsingTCPFastOpen() const OVERRIDE;
66 virtual int64 NumBytesRead() const OVERRIDE; 66 virtual int64 NumBytesRead() const OVERRIDE;
67 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; 67 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
68 68
69 // Socket implementation. 69 // Socket implementation.
70 virtual int Read(IOBuffer* buf, 70 virtual int Read(IOBuffer* buf,
71 int buf_len, 71 int buf_len,
72 OldCompletionCallback* callback) OVERRIDE; 72 OldCompletionCallback* callback) OVERRIDE;
73 virtual int Read(IOBuffer* buf,
74 int buf_len,
75 const CompletionCallback& callback) OVERRIDE;
73 virtual int Write(IOBuffer* buf, 76 virtual int Write(IOBuffer* buf,
74 int buf_len, 77 int buf_len,
75 OldCompletionCallback* callback) OVERRIDE; 78 OldCompletionCallback* callback) OVERRIDE;
76 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 79 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
77 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 80 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
78 81
79 private: 82 private:
80 bool completed_handshake() const { 83 bool completed_handshake() const {
81 return next_handshake_state_ == STATE_COMPLETED_HANDSHAKE; 84 return next_handshake_state_ == STATE_COMPLETED_HANDSHAKE;
82 } 85 }
(...skipping 30 matching lines...) Expand all
113 116
114 OldCompletionCallbackImpl<SSLClientSocketMac> transport_read_callback_; 117 OldCompletionCallbackImpl<SSLClientSocketMac> transport_read_callback_;
115 OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_; 118 OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_;
116 119
117 scoped_ptr<ClientSocketHandle> transport_; 120 scoped_ptr<ClientSocketHandle> transport_;
118 HostPortPair host_and_port_; 121 HostPortPair host_and_port_;
119 SSLConfig ssl_config_; 122 SSLConfig ssl_config_;
120 123
121 OldCompletionCallback* old_user_connect_callback_; 124 OldCompletionCallback* old_user_connect_callback_;
122 CompletionCallback user_connect_callback_; 125 CompletionCallback user_connect_callback_;
123 OldCompletionCallback* user_read_callback_; 126 OldCompletionCallback* old_user_read_callback_;
127 CompletionCallback user_read_callback_;
124 OldCompletionCallback* user_write_callback_; 128 OldCompletionCallback* user_write_callback_;
125 129
126 // Used by Read function. 130 // Used by Read function.
127 scoped_refptr<IOBuffer> user_read_buf_; 131 scoped_refptr<IOBuffer> user_read_buf_;
128 int user_read_buf_len_; 132 int user_read_buf_len_;
129 133
130 // Used by Write function. 134 // Used by Write function.
131 scoped_refptr<IOBuffer> user_write_buf_; 135 scoped_refptr<IOBuffer> user_write_buf_;
132 int user_write_buf_len_; 136 int user_write_buf_len_;
133 137
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // These are the IOBuffers used for operations on the underlying transport. 179 // These are the IOBuffers used for operations on the underlying transport.
176 scoped_refptr<IOBuffer> read_io_buf_; 180 scoped_refptr<IOBuffer> read_io_buf_;
177 scoped_refptr<IOBuffer> write_io_buf_; 181 scoped_refptr<IOBuffer> write_io_buf_;
178 182
179 BoundNetLog net_log_; 183 BoundNetLog net_log_;
180 }; 184 };
181 185
182 } // namespace net 186 } // namespace net
183 187
184 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ 188 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698