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

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

Issue 8801004: base::Bind: Convert StreamSocket::Connect. (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/socks_client_socket.cc ('k') | net/socket/ssl_client_socket_mac.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_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 22 matching lines...) Expand all
33 // in the server's certificate during the SSL handshake. If SSL client 33 // in the server's certificate during the SSL handshake. If SSL client
34 // authentication is requested, the host_and_port field of SSLCertRequestInfo 34 // authentication is requested, the host_and_port field of SSLCertRequestInfo
35 // will be populated with |host_and_port|. |ssl_config| specifies 35 // will be populated with |host_and_port|. |ssl_config| specifies
36 // the SSL settings. 36 // the SSL settings.
37 SSLClientSocketMac(ClientSocketHandle* transport_socket, 37 SSLClientSocketMac(ClientSocketHandle* transport_socket,
38 const HostPortPair& host_and_port, 38 const HostPortPair& host_and_port,
39 const SSLConfig& ssl_config, 39 const SSLConfig& ssl_config,
40 const SSLClientSocketContext& context); 40 const SSLClientSocketContext& context);
41 virtual ~SSLClientSocketMac(); 41 virtual ~SSLClientSocketMac();
42 42
43 // SSLClientSocket methods: 43 // SSLClientSocket implementation.
44 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; 44 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE;
45 virtual void GetSSLCertRequestInfo( 45 virtual void GetSSLCertRequestInfo(
46 SSLCertRequestInfo* cert_request_info) OVERRIDE; 46 SSLCertRequestInfo* cert_request_info) OVERRIDE;
47 virtual int ExportKeyingMaterial(const base::StringPiece& label, 47 virtual int ExportKeyingMaterial(const base::StringPiece& label,
48 const base::StringPiece& context, 48 const base::StringPiece& context,
49 unsigned char *out, 49 unsigned char *out,
50 unsigned int outlen) OVERRIDE; 50 unsigned int outlen) OVERRIDE;
51 virtual NextProtoStatus GetNextProto(std::string* proto) OVERRIDE; 51 virtual NextProtoStatus GetNextProto(std::string* proto) OVERRIDE;
52 52
53 // StreamSocket methods: 53 // StreamSocket implementation.
54 virtual int Connect(OldCompletionCallback* callback) OVERRIDE; 54 virtual int Connect(OldCompletionCallback* callback) OVERRIDE;
55 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
55 virtual void Disconnect() OVERRIDE; 56 virtual void Disconnect() OVERRIDE;
56 virtual bool IsConnected() const OVERRIDE; 57 virtual bool IsConnected() const OVERRIDE;
57 virtual bool IsConnectedAndIdle() const OVERRIDE; 58 virtual bool IsConnectedAndIdle() const OVERRIDE;
58 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; 59 virtual int GetPeerAddress(AddressList* address) const OVERRIDE;
59 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; 60 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE;
60 virtual const BoundNetLog& NetLog() const OVERRIDE; 61 virtual const BoundNetLog& NetLog() const OVERRIDE;
61 virtual void SetSubresourceSpeculation() OVERRIDE; 62 virtual void SetSubresourceSpeculation() OVERRIDE;
62 virtual void SetOmniboxSpeculation() OVERRIDE; 63 virtual void SetOmniboxSpeculation() OVERRIDE;
63 virtual bool WasEverUsed() const OVERRIDE; 64 virtual bool WasEverUsed() const OVERRIDE;
64 virtual bool UsingTCPFastOpen() const OVERRIDE; 65 virtual bool UsingTCPFastOpen() const OVERRIDE;
65 virtual int64 NumBytesRead() const OVERRIDE; 66 virtual int64 NumBytesRead() const OVERRIDE;
66 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; 67 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
67 68
68 // Socket methods: 69 // Socket implementation.
69 virtual int Read(IOBuffer* buf, 70 virtual int Read(IOBuffer* buf,
70 int buf_len, 71 int buf_len,
71 OldCompletionCallback* callback) OVERRIDE; 72 OldCompletionCallback* callback) OVERRIDE;
72 virtual int Write(IOBuffer* buf, 73 virtual int Write(IOBuffer* buf,
73 int buf_len, 74 int buf_len,
74 OldCompletionCallback* callback) OVERRIDE; 75 OldCompletionCallback* callback) OVERRIDE;
75 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 76 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
76 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 77 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
77 78
78 private: 79 private:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const void* data, 111 const void* data,
111 size_t* data_length); 112 size_t* data_length);
112 113
113 OldCompletionCallbackImpl<SSLClientSocketMac> transport_read_callback_; 114 OldCompletionCallbackImpl<SSLClientSocketMac> transport_read_callback_;
114 OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_; 115 OldCompletionCallbackImpl<SSLClientSocketMac> transport_write_callback_;
115 116
116 scoped_ptr<ClientSocketHandle> transport_; 117 scoped_ptr<ClientSocketHandle> transport_;
117 HostPortPair host_and_port_; 118 HostPortPair host_and_port_;
118 SSLConfig ssl_config_; 119 SSLConfig ssl_config_;
119 120
120 OldCompletionCallback* user_connect_callback_; 121 OldCompletionCallback* old_user_connect_callback_;
122 CompletionCallback user_connect_callback_;
121 OldCompletionCallback* user_read_callback_; 123 OldCompletionCallback* user_read_callback_;
122 OldCompletionCallback* user_write_callback_; 124 OldCompletionCallback* user_write_callback_;
123 125
124 // Used by Read function. 126 // Used by Read function.
125 scoped_refptr<IOBuffer> user_read_buf_; 127 scoped_refptr<IOBuffer> user_read_buf_;
126 int user_read_buf_len_; 128 int user_read_buf_len_;
127 129
128 // Used by Write function. 130 // Used by Write function.
129 scoped_refptr<IOBuffer> user_write_buf_; 131 scoped_refptr<IOBuffer> user_write_buf_;
130 int user_write_buf_len_; 132 int user_write_buf_len_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // These are the IOBuffers used for operations on the underlying transport. 175 // These are the IOBuffers used for operations on the underlying transport.
174 scoped_refptr<IOBuffer> read_io_buf_; 176 scoped_refptr<IOBuffer> read_io_buf_;
175 scoped_refptr<IOBuffer> write_io_buf_; 177 scoped_refptr<IOBuffer> write_io_buf_;
176 178
177 BoundNetLog net_log_; 179 BoundNetLog net_log_;
178 }; 180 };
179 181
180 } // namespace net 182 } // namespace net
181 183
182 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ 184 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket.cc ('k') | net/socket/ssl_client_socket_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698