diff options
author | Torne (Richard Coles) <torne@google.com> | 2013-08-05 13:57:33 +0100 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2013-08-05 13:57:33 +0100 |
commit | a36e5920737c6adbddd3e43b760e5de8431db6e0 (patch) | |
tree | 347d048bb8c8828d50113bf94ace40bf0613f2cd /content/browser/download/download_stats.cc | |
parent | 34378da0e9429d394aafdaa771301aff58447cb1 (diff) | |
download | chromium_org-a36e5920737c6adbddd3e43b760e5de8431db6e0.tar.gz |
Merge from Chromium at DEPS revision r215573
This commit was generated by merge_to_master.py.
Change-Id: Ib95814f98e5765b459dd32425f9bf9138edf2bca
Diffstat (limited to 'content/browser/download/download_stats.cc')
-rw-r--r-- | content/browser/download/download_stats.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc index c1b251d9a0..f8a1e09f19 100644 --- a/content/browser/download/download_stats.cc +++ b/content/browser/download/download_stats.cc @@ -179,7 +179,8 @@ void RecordDownloadWriteLoopCount(int count) { } void RecordAcceptsRanges(const std::string& accepts_ranges, - int64 download_len) { + int64 download_len, + const std::string& etag) { int64 max = 1024 * 1024 * 1024; // One Terabyte. download_len /= 1024; // In Kilobytes static const int kBuckets = 50; @@ -196,6 +197,10 @@ 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); } else { UMA_HISTOGRAM_CUSTOM_COUNTS("Download.AcceptRangesMissingOrInvalid.KBytes", download_len, |