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

Unified Diff: net/http/http_stream_parser.cc

Issue 1314783007: Added and implemented HttpStream::GetTotalSentBytes for basic streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master 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_stream_parser.h ('k') | net/http/http_stream_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_parser.cc
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 953635b308f947eba80b8fff6fdabd0336546f65..9ddae4853dacb370c5072a34ddcdea90f8a52404 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -208,6 +208,7 @@ HttpStreamParser::HttpStreamParser(ClientSocketHandle* connection,
read_buf_unused_offset_(0),
response_header_start_offset_(-1),
received_bytes_(0),
+ sent_bytes_(0),
response_(nullptr),
response_body_length_(-1),
response_body_read_(0),
@@ -475,6 +476,7 @@ int HttpStreamParser::DoSendHeadersComplete(int result) {
return result;
}
+ sent_bytes_ += result;
request_headers_->DidConsume(result);
if (request_headers_->BytesRemaining() > 0) {
io_state_ = STATE_SEND_HEADERS;
@@ -532,6 +534,7 @@ int HttpStreamParser::DoSendBodyComplete(int result) {
return result;
}
+ sent_bytes_ += result;
request_body_send_buf_->DidConsume(result);
io_state_ = STATE_SEND_BODY;
« no previous file with comments | « net/http/http_stream_parser.h ('k') | net/http/http_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698