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..0d75e68ec85890a2def5983dfdb1a4332a8d81e3 100644 |
--- a/net/socket/socket_bio_adapter.cc |
+++ b/net/socket/socket_bio_adapter.cc |
@@ -53,6 +53,16 @@ bool SocketBIOAdapter::HasPendingReadData() { |
return read_result_ > 0; |
} |
+size_t SocketBIOAdapter::GetAllocationSize() const { |
+ size_t buffer_size = 0; |
+ if (read_buffer_) |
+ buffer_size += read_buffer_capacity_; |
+ |
+ if (write_buffer_) |
+ buffer_size += write_buffer_capacity_; |
+ return buffer_size; |
+} |
+ |
int SocketBIOAdapter::BIORead(char* out, int len) { |
if (len <= 0) |
return len; |