| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_IMPL_H_ | 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ |
| 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ | 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 void DumpMemoryStats(SocketMemoryStats* stats) const override; | 120 void DumpMemoryStats(SocketMemoryStats* stats) const override; |
| 121 | 121 |
| 122 // Dumps memory allocation stats. |pmd| is the browser process memory dump. | 122 // Dumps memory allocation stats. |pmd| is the browser process memory dump. |
| 123 static void DumpSSLClientSessionMemoryStats( | 123 static void DumpSSLClientSessionMemoryStats( |
| 124 base::trace_event::ProcessMemoryDump* pmd); | 124 base::trace_event::ProcessMemoryDump* pmd); |
| 125 | 125 |
| 126 // Socket implementation. | 126 // Socket implementation. |
| 127 int Read(IOBuffer* buf, | 127 int Read(IOBuffer* buf, |
| 128 int buf_len, | 128 int buf_len, |
| 129 const CompletionCallback& callback) override; | 129 const CompletionCallback& callback) override; |
| 130 int ReadIfReady(IOBuffer* buf, |
| 131 int buf_len, |
| 132 const CompletionCallback& callback) override; |
| 130 int Write(IOBuffer* buf, | 133 int Write(IOBuffer* buf, |
| 131 int buf_len, | 134 int buf_len, |
| 132 const CompletionCallback& callback) override; | 135 const CompletionCallback& callback) override; |
| 133 int SetReceiveBufferSize(int32_t size) override; | 136 int SetReceiveBufferSize(int32_t size) override; |
| 134 int SetSendBufferSize(int32_t size) override; | 137 int SetSendBufferSize(int32_t size) override; |
| 135 | 138 |
| 136 // SocketBIOAdapter implementation: | 139 // SocketBIOAdapter implementation: |
| 137 void OnReadReady() override; | 140 void OnReadReady(int rv) override; |
| 138 void OnWriteReady() override; | 141 void OnWriteReady(int rv) override; |
| 139 | 142 |
| 140 private: | 143 private: |
| 141 class PeerCertificateChain; | 144 class PeerCertificateChain; |
| 142 class SSLContext; | 145 class SSLContext; |
| 143 friend class SSLClientSocket; | 146 friend class SSLClientSocket; |
| 144 friend class SSLContext; | 147 friend class SSLContext; |
| 145 | 148 |
| 146 int Init(); | 149 int Init(); |
| 147 void DoReadCallback(int result); | 150 void DoReadCallback(int result); |
| 148 void DoWriteCallback(int result); | 151 void DoWriteCallback(int result); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // True if PKP is bypassed due to a local trust anchor. | 355 // True if PKP is bypassed due to a local trust anchor. |
| 353 bool pkp_bypassed_; | 356 bool pkp_bypassed_; |
| 354 | 357 |
| 355 NetLogWithSource net_log_; | 358 NetLogWithSource net_log_; |
| 356 base::WeakPtrFactory<SSLClientSocketImpl> weak_factory_; | 359 base::WeakPtrFactory<SSLClientSocketImpl> weak_factory_; |
| 357 }; | 360 }; |
| 358 | 361 |
| 359 } // namespace net | 362 } // namespace net |
| 360 | 363 |
| 361 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ | 364 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_IMPL_H_ |
| OLD | NEW |