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() override; |
138 void OnWriteReady() override; | 141 void OnWriteReady() override; |
139 | 142 |
(...skipping 12 matching lines...) Expand all Loading... | |
152 int DoChannelIDLookup(); | 155 int DoChannelIDLookup(); |
153 int DoChannelIDLookupComplete(int result); | 156 int DoChannelIDLookupComplete(int result); |
154 int DoVerifyCert(int result); | 157 int DoVerifyCert(int result); |
155 int DoVerifyCertComplete(int result); | 158 int DoVerifyCertComplete(int result); |
156 void DoConnectCallback(int result); | 159 void DoConnectCallback(int result); |
157 void UpdateServerCert(); | 160 void UpdateServerCert(); |
158 | 161 |
159 void OnHandshakeIOComplete(int result); | 162 void OnHandshakeIOComplete(int result); |
160 | 163 |
161 int DoHandshakeLoop(int last_io_result); | 164 int DoHandshakeLoop(int last_io_result); |
162 int DoPayloadRead(); | 165 int DoPayloadRead(IOBuffer* buf, int buf_len); |
Bence
2017/03/03 16:33:41
Optional: add a comment about whether this method
xunjieli
2017/03/03 19:41:06
Acknowledged.
| |
163 int DoPayloadWrite(); | 166 int DoPayloadWrite(); |
164 | 167 |
165 // Called when an asynchronous event completes which may have blocked the | 168 // Called when an asynchronous event completes which may have blocked the |
166 // pending Connect, Read or Write calls, if any. Retries all state machines | 169 // pending Connect, Read or Write calls, if any. Retries all state machines |
167 // and, if complete, runs the respective callbacks. | 170 // and, if complete, runs the respective callbacks. |
168 void RetryAllOperations(); | 171 void RetryAllOperations(); |
169 | 172 |
170 int VerifyCT(); | 173 int VerifyCT(); |
171 | 174 |
172 // Callback from the SSL layer that indicates the remote server is requesting | 175 // Callback from the SSL layer that indicates the remote server is requesting |
(...skipping 179 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 |