Implement GetTotalReceivedBytes() for StreamSocket
GetTotalReceivedBytes() returns the number of bytes
read from the network. Currently, only TCPClientSocket
implements GetTotalReceivedBytes().
Tests are in ssl_client_socket_unittest.cc.
Right now GetTotalReceivedBytes() is not plumbed to the
higher layers. Once that's done, this will help us in
precisely computing the network bytes used by a request.
BUG=537754
Review URL: https://codereview.chromium.org/1343563002
Cr-Commit-Position: refs/heads/master@{#354092}
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index 6bc52b1..03ff361 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -15,6 +15,7 @@
#include "net/socket/ssl_server_socket.h"
+#include <stdint.h>
#include <stdlib.h>
#include <queue>
@@ -23,6 +24,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/location.h"
+#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
@@ -239,6 +241,11 @@
void AddConnectionAttempts(const ConnectionAttempts& attempts) override {}
+ int64_t GetTotalReceivedBytes() const override {
+ NOTIMPLEMENTED();
+ return 0;
+ }
+
private:
BoundNetLog net_log_;
FakeDataChannel* incoming_;