Tweak p2p timeouts and minimum speed.

See the bug for discussion.

BUG=chromium:290287
TEST=Unit tests pass.

Change-Id: I0942e97a1dc0b8ebccc7581e236f21df67866471
Reviewed-on: https://chromium-review.googlesource.com/169102
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
diff --git a/constants.h b/constants.h
index 3079108..cd809d4 100644
--- a/constants.h
+++ b/constants.h
@@ -116,14 +116,14 @@
 // Number of redirects allowed when downloading.
 const int kDownloadMaxRedirects = 10;
 
-// The minimum average speed (50 kB/sec) that downloads must sustain...
+// The minimum average speed that downloads must sustain...
 //
 // This is set low because some devices may have very poor
 // connecticity and we want to make as much forward progress as
-// possible. For p2p this is high (50 kB/second) since we can assume
+// possible. For p2p this is high (25 kB/second) since we can assume
 // high bandwidth (same LAN) and we want to fail fast.
 const int kDownloadLowSpeedLimitBps = 1;
-const int kDownloadP2PLowSpeedLimitBps = 50 * 1000;
+const int kDownloadP2PLowSpeedLimitBps = 25 * 1000;
 
 // ... measured over this period.
 //
@@ -133,7 +133,7 @@
 // relatively low since we want to fail fast.
 const int kDownloadLowSpeedTimeSeconds = 90;
 const int kDownloadDevModeLowSpeedTimeSeconds = 180;
-const int kDownloadP2PLowSpeedTimeSeconds = 30;
+const int kDownloadP2PLowSpeedTimeSeconds = 60;
 
 // The maximum amount of HTTP server reconnect attempts.
 //
@@ -141,7 +141,7 @@
 // succeeding. When using p2p, this is low in order to fail fast.
 const int kDownloadMaxRetryCount = 20;
 const int kDownloadMaxRetryCountOobeNotComplete = 3;
-const int kDownloadP2PMaxRetryCount = 3;
+const int kDownloadP2PMaxRetryCount = 5;
 
 // The connect timeout, in seconds.
 //