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

Unified Diff: net/http/http_transaction_test_util.h

Issue 1327763003: Added and implemented URLRequest::GetTotalSentBytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spdy_sent_bytes_impl
Patch Set: Addressed nits Created 5 years, 3 months 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/http/http_transaction.h ('k') | net/http/http_transaction_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_transaction_test_util.h
diff --git a/net/http/http_transaction_test_util.h b/net/http/http_transaction_test_util.h
index 52b38e845decee9b81b9ba93d0b43645f09b09d7..0c311df4cde55c3e646206f104f9e57673039611 100644
--- a/net/http/http_transaction_test_util.h
+++ b/net/http/http_transaction_test_util.h
@@ -7,6 +7,8 @@
#include "net/http/http_transaction.h"
+#include <stdint.h>
+
#include <string>
#include "base/callback.h"
@@ -197,6 +199,8 @@ class MockNetworkTransaction
int64 GetTotalReceivedBytes() const override;
+ int64_t GetTotalSentBytes() const override;
+
void DoneReading() override;
const HttpResponseInfo* GetResponseInfo() const override;
@@ -230,6 +234,13 @@ class MockNetworkTransaction
RequestPriority priority() const { return priority_; }
const HttpRequestInfo* request() const { return request_; }
+ // Bogus value that will be returned by GetTotalReceivedBytes() if the
+ // MockNetworkTransaction was started.
+ static const int64_t kTotalReceivedBytes;
+ // Bogus value that will be returned by GetTotalSentBytes() if the
+ // MockNetworkTransaction was started.
+ static const int64_t kTotalSentBytes;
+
private:
int StartInternal(const HttpRequestInfo* request,
const CompletionCallback& callback,
@@ -246,6 +257,7 @@ class MockNetworkTransaction
CreateHelper* websocket_handshake_stream_create_helper_;
base::WeakPtr<MockNetworkLayer> transaction_factory_;
int64 received_bytes_;
+ int64_t sent_bytes_;
// NetLog ID of the fake / non-existent underlying socket used by the
// connection. Requires Start() be passed a BoundNetLog with a real NetLog to
« no previous file with comments | « net/http/http_transaction.h ('k') | net/http/http_transaction_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698