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

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

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 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
« no previous file with comments | « net/socket/socks_client_socket_unittest.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 7
8 #include <Security/Security.h> 8 #include <Security/Security.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "net/base/cert_verify_result.h" 14 #include "net/base/cert_verify_result.h"
15 #include "net/base/completion_callback.h" 15 #include "net/base/completion_callback.h"
16 #include "net/base/net_log.h"
16 #include "net/base/ssl_config_service.h" 17 #include "net/base/ssl_config_service.h"
17 #include "net/socket/ssl_client_socket.h" 18 #include "net/socket/ssl_client_socket.h"
18 19
19 namespace net { 20 namespace net {
20 21
21 class CertVerifier; 22 class CertVerifier;
22 class LoadLog;
23 23
24 // An SSL client socket implemented with Secure Transport. 24 // An SSL client socket implemented with Secure Transport.
25 class SSLClientSocketMac : public SSLClientSocket { 25 class SSLClientSocketMac : public SSLClientSocket {
26 public: 26 public:
27 // Takes ownership of the transport_socket, which may already be connected. 27 // Takes ownership of the transport_socket, which may already be connected.
28 // The given hostname will be compared with the name(s) in the server's 28 // The given hostname will be compared with the name(s) in the server's
29 // certificate during the SSL handshake. ssl_config specifies the SSL 29 // certificate during the SSL handshake. ssl_config specifies the SSL
30 // settings. 30 // settings.
31 SSLClientSocketMac(ClientSocket* transport_socket, 31 SSLClientSocketMac(ClientSocket* transport_socket,
32 const std::string& hostname, 32 const std::string& hostname,
33 const SSLConfig& ssl_config); 33 const SSLConfig& ssl_config);
34 ~SSLClientSocketMac(); 34 ~SSLClientSocketMac();
35 35
36 // SSLClientSocket methods: 36 // SSLClientSocket methods:
37 virtual void GetSSLInfo(SSLInfo* ssl_info); 37 virtual void GetSSLInfo(SSLInfo* ssl_info);
38 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info); 38 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info);
39 virtual NextProtoStatus GetNextProto(std::string* proto); 39 virtual NextProtoStatus GetNextProto(std::string* proto);
40 40
41 // ClientSocket methods: 41 // ClientSocket methods:
42 virtual int Connect(CompletionCallback* callback, LoadLog* load_log); 42 virtual int Connect(CompletionCallback* callback, const BoundNetLog& net_log);
43 virtual void Disconnect(); 43 virtual void Disconnect();
44 virtual bool IsConnected() const; 44 virtual bool IsConnected() const;
45 virtual bool IsConnectedAndIdle() const; 45 virtual bool IsConnectedAndIdle() const;
46 virtual int GetPeerAddress(AddressList* address) const; 46 virtual int GetPeerAddress(AddressList* address) const;
47 47
48 // Socket methods: 48 // Socket methods:
49 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); 49 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
50 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); 50 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
51 virtual bool SetReceiveBufferSize(int32 size); 51 virtual bool SetReceiveBufferSize(int32 size);
52 virtual bool SetSendBufferSize(int32 size); 52 virtual bool SetSendBufferSize(int32 size);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // These buffers hold data retrieved from/sent to the underlying transport 120 // These buffers hold data retrieved from/sent to the underlying transport
121 // before it's fed to the SSL engine. 121 // before it's fed to the SSL engine.
122 std::vector<char> send_buffer_; 122 std::vector<char> send_buffer_;
123 int pending_send_error_; 123 int pending_send_error_;
124 std::vector<char> recv_buffer_; 124 std::vector<char> recv_buffer_;
125 125
126 // These are the IOBuffers used for operations on the underlying transport. 126 // These are the IOBuffers used for operations on the underlying transport.
127 scoped_refptr<IOBuffer> read_io_buf_; 127 scoped_refptr<IOBuffer> read_io_buf_;
128 scoped_refptr<IOBuffer> write_io_buf_; 128 scoped_refptr<IOBuffer> write_io_buf_;
129 129
130 scoped_refptr<LoadLog> load_log_; 130 BoundNetLog net_log_;
131 }; 131 };
132 132
133 } // namespace net 133 } // namespace net
134 134
135 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_ 135 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_MAC_H_
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket_unittest.cc ('k') | net/socket/ssl_client_socket_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698