summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorgagansingh@google.com <gagansingh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 16:47:06 +0000
committergagansingh@google.com <gagansingh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 16:47:06 +0000
commit0ca76cb6e3d1ca12d55bab9900a8f0a650c6db09 (patch)
treef03dd8bc67014c738f70a1c1bb20f62af72902e6 /content/browser
parent591805d2915ce33ccd61eb624924f14f95b5c15d (diff)
downloadchromium_src-0ca76cb6e3d1ca12d55bab9900a8f0a650c6db09.zip
chromium_src-0ca76cb6e3d1ca12d55bab9900a8f0a650c6db09.tar.gz
chromium_src-0ca76cb6e3d1ca12d55bab9900a8f0a650c6db09.tar.bz2
Warmth of a connection (cwnd) is estimated by the amount of data written to the socket.
Choosing the warmest connection would mean faster resource load times. idle time is the time a socket has remained idle (no http requests being served on it). Probability of server resetting a connection increases with idle time duration. Using a cost function that takes into account bytes transferred and idle time to pick best connection to schedule http requests on. CODEREVIEW done in http://codereview.chromium.org/6990036/ Contributed by gagansingh@google.com Review URL: http://codereview.chromium.org/7189055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90373 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/renderer_host/p2p/socket_host_test_utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/content/browser/renderer_host/p2p/socket_host_test_utils.h b/content/browser/renderer_host/p2p/socket_host_test_utils.h
index bc829fd..a24d094 100644
--- a/content/browser/renderer_host/p2p/socket_host_test_utils.h
+++ b/content/browser/renderer_host/p2p/socket_host_test_utils.h
@@ -73,6 +73,8 @@ class FakeSocket : public net::StreamSocket {
virtual void SetOmniboxSpeculation() OVERRIDE;
virtual bool WasEverUsed() const OVERRIDE;
virtual bool UsingTCPFastOpen() const OVERRIDE;
+ virtual int64 NumBytesRead() const OVERRIDE;
+ virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
private:
bool read_pending_;
@@ -209,6 +211,14 @@ bool FakeSocket::UsingTCPFastOpen() const {
return false;
}
+int64 FakeSocket::NumBytesRead() const {
+ return -1;
+}
+
+base::TimeDelta FakeSocket::GetConnectTimeMicros() const {
+ return base::TimeDelta::FromMicroseconds(-1);
+}
+
void CreateRandomPacket(std::vector<char>* packet) {
size_t size = kStunHeaderSize + rand() % 1000;
packet->resize(size);