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

Unified Diff: net/http/http_basic_stream.cc

Issue 6990036: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 6 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
Index: net/http/http_basic_stream.cc
===================================================================
--- net/http/http_basic_stream.cc (revision 86260)
+++ net/http/http_basic_stream.cc (working copy)
@@ -34,6 +34,7 @@
request_info_ = request_info;
parser_.reset(new HttpStreamParser(connection_.get(), request_info,
read_buf_, net_log));
+ bytes_read_offset_ = connection_->socket()->NumBytesRead();
return OK;
}
@@ -119,4 +120,12 @@
return false;
}
+double HttpBasicStream::GetRTTMs() const {
+ return connection_->socket()->GetRTTMs();
+}
+
+int HttpBasicStream::GetBytesReceived() const {
+ return connection_->socket()->NumBytesRead() - bytes_read_offset_;
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698