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

Unified Diff: content/browser/download/download_stats.cc

Issue 66993008: [Downloads] Cleanup DownloadResourceHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Annotate histogram enum with date it became obsolete. Created 7 years, 1 month 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 | « content/browser/download/download_stats.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_stats.cc
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
index 5b5f893c2f47d2ab87f4bf7dcadb91de5e842fb0..df3a059f5cc80bc4ac1586bb802e78c7e2ace2d8 100644
--- a/content/browser/download/download_stats.cc
+++ b/content/browser/download/download_stats.cc
@@ -332,7 +332,7 @@ void RecordDownloadWriteLoopCount(int count) {
void RecordAcceptsRanges(const std::string& accepts_ranges,
int64 download_len,
- const std::string& etag) {
+ bool has_strong_validator) {
int64 max = 1024 * 1024 * 1024; // One Terabyte.
download_len /= 1024; // In Kilobytes
static const int kBuckets = 50;
@@ -349,10 +349,8 @@ void RecordAcceptsRanges(const std::string& accepts_ranges,
1,
max,
kBuckets);
- // ETags that start with "W/" are considered weak ETags which don't imply
- // byte-wise equality.
- if (!StartsWithASCII(etag, "w/", false))
- RecordDownloadCount(STRONG_ETAG_AND_ACCEPTS_RANGES);
+ if (has_strong_validator)
+ RecordDownloadCount(STRONG_VALIDATOR_AND_ACCEPTS_RANGES);
} else {
UMA_HISTOGRAM_CUSTOM_COUNTS("Download.AcceptRangesMissingOrInvalid.KBytes",
download_len,
« no previous file with comments | « content/browser/download/download_stats.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698