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

Unified Diff: net/socket/ssl_client_socket_impl.h

Issue 2593063003: Add Socket::ReadIfReady() (Closed)
Patch Set: Fix perf tests (removed invalid CHECKs) Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: net/socket/ssl_client_socket_impl.h
diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_impl.h
index 86505ab2f4a80c3d8620bf3684b999603bf1bcf8..d0ebcb3c81c4302a11d2f144a906cf0d73b2f69d 100644
--- a/net/socket/ssl_client_socket_impl.h
+++ b/net/socket/ssl_client_socket_impl.h
@@ -127,6 +127,9 @@ class SSLClientSocketImpl : public SSLClientSocket,
int Read(IOBuffer* buf,
int buf_len,
const CompletionCallback& callback) override;
+ int ReadIfReady(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override;
int Write(IOBuffer* buf,
int buf_len,
const CompletionCallback& callback) override;
@@ -134,8 +137,8 @@ class SSLClientSocketImpl : public SSLClientSocket,
int SetSendBufferSize(int32_t size) override;
// SocketBIOAdapter implementation:
- void OnReadReady() override;
- void OnWriteReady() override;
+ void OnReadReady(int rv) override;
+ void OnWriteReady(int rv) override;
private:
class PeerCertificateChain;
@@ -159,13 +162,14 @@ class SSLClientSocketImpl : public SSLClientSocket,
void OnHandshakeIOComplete(int result);
int DoHandshakeLoop(int last_io_result);
- int DoPayloadRead();
+ int DoPayloadRead(IOBuffer* buf, int buf_len);
int DoPayloadWrite();
// Called when an asynchronous event completes which may have blocked the
// pending Connect, Read or Write calls, if any. Retries all state machines
- // and, if complete, runs the respective callbacks.
- void RetryAllOperations();
+ // and, if complete, runs the respective callbacks. |rv| is the net error
+ // of the last asynchronous event.
+ void RetryAllOperations(int rv);
int VerifyCT();

Powered by Google App Engine
This is Rietveld 408576698