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

Unified Diff: net/socket/socket_bio_adapter.cc

Issue 2414883005: TEMP DO NOT LAND (Closed)
Patch Set: tmp Created 4 years, 1 month 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
« no previous file with comments | « net/socket/socket_bio_adapter.h ('k') | net/socket/ssl_client_socket_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « net/socket/socket_bio_adapter.h ('k') | net/socket/ssl_client_socket_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698