| Index: net/socket/socket_bio_adapter.cc
|
| diff --git a/net/socket/socket_bio_adapter.cc b/net/socket/socket_bio_adapter.cc
|
| index 1241bae6f90a4412d8b9c4c0e455d8704ad67c98..6a3d394021d62185f4738e27bc03a5bfcf41a38e 100644
|
| --- a/net/socket/socket_bio_adapter.cc
|
| +++ b/net/socket/socket_bio_adapter.cc
|
| @@ -18,6 +18,10 @@
|
| #include "net/ssl/openssl_ssl_util.h"
|
| #include "third_party/boringssl/src/include/openssl/bio.h"
|
|
|
| +#include "base/trace_event/memory_allocator_dump.h"
|
| +#include "base/trace_event/process_memory_dump.h"
|
| +#include "base/strings/stringprintf.h"
|
| +
|
| namespace net {
|
|
|
| SocketBIOAdapter::SocketBIOAdapter(StreamSocket* socket,
|
| @@ -53,6 +57,16 @@ bool SocketBIOAdapter::HasPendingReadData() {
|
| return read_result_ > 0;
|
| }
|
|
|
| +size_t SocketBIOAdapter::GetEffectiveSize() const {
|
| + size_t effective_size = 0;
|
| + if (read_buffer_)
|
| + effective_size+=read_buffer_capacity_;
|
| +
|
| + if (write_buffer_)
|
| + effective_size+= write_buffer_capacity_;
|
| + return effective_size;
|
| +}
|
| +
|
| int SocketBIOAdapter::BIORead(char* out, int len) {
|
| if (len <= 0)
|
| return len;
|
|
|