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

Unified Diff: net/socket/socket_bio_adapter.cc

Issue 2541093003: Instrument SSL sockets using MemoryDumpProvider (Closed)
Patch Set: rebased Created 4 years 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/socket_bio_adapter.cc
diff --git a/net/socket/socket_bio_adapter.cc b/net/socket/socket_bio_adapter.cc
index 1241bae6f90a4412d8b9c4c0e455d8704ad67c98..84b8874bdc36ce1809b8ec84aa40e292534c31c9 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 effective_size = 0;
Primiano Tucci (use gerrit) 2016/12/06 17:06:28 just a super minor comment: in memory-infra contex
xunjieli 2016/12/06 18:36:08 Done.
+ 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;

Powered by Google App Engine
This is Rietveld 408576698