p2p: Add HttpPeer to DownloadSource enumeration
This way the Installer.DownloadSourcesUsed metric conveys how often
p2p is used and new metrics Installer.SuccessfulMBsDownloadedFromHttpPeer
and Installer.TotalMBsDownloadedFromHttpPeer gives additional detail.
BUG=chromium:284714
TEST=modify unit tests to cover this case + unit tests pass
Change-Id: Ia4dff090091a282e1a184c2b18f8290749f5fdeb
Reviewed-on: https://chromium-review.googlesource.com/167913
Reviewed-by: Alex Deymo <[email protected]>
Commit-Queue: David Zeuthen <[email protected]>
Tested-by: David Zeuthen <[email protected]>
diff --git a/utils.cc b/utils.cc
index 8f04134..007d154 100644
--- a/utils.cc
+++ b/utils.cc
@@ -773,6 +773,7 @@
switch (source) {
case kDownloadSourceHttpsServer: return "HttpsServer";
case kDownloadSourceHttpServer: return "HttpServer";
+ case kDownloadSourceHttpPeer: return "HttpPeer";
case kNumDownloadSources: return "Unknown";
// Don't add a default case to let the compiler warn about newly added
// download sources which should be added here.