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

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

Issue 20609004: [Downloads] Some UMA for downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months 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_resource_handler.cc ('k') | content/browser/download/download_stats.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_stats.h
diff --git a/content/browser/download/download_stats.h b/content/browser/download/download_stats.h
index 287b34d850c34dd77fbdd9b967efee2bc5b3e772..be2ae4b56798527df1a766f2f49aeeffb27fe611 100644
--- a/content/browser/download/download_stats.h
+++ b/content/browser/download/download_stats.h
@@ -68,6 +68,14 @@ enum DownloadCountTypes {
// successful invocation of ScanAndSaveDownloadedFile().
FILE_MISSING_AFTER_SUCCESSFUL_SCAN_COUNT,
+ // Count of downloads that supplies a strong ETag and has a 'Accept-Ranges:
+ // bytes' header. These downloads are candidates for partial resumption.
+ STRONG_ETAG_AND_ACCEPTS_RANGES,
+
+ // Count of downloads that didn't have a valid WebContents at the time it was
+ // interrupted.
+ INTERRUPTED_WITHOUT_WEBCONTENTS,
+
DOWNLOAD_COUNT_TYPES_LAST_ENTRY
};
@@ -85,6 +93,13 @@ enum DownloadSource {
// (e.g. by Alt-click) through the IPC ViewHostMsg_DownloadUrl.
INITIATED_BY_RENDERER,
+ // Fomerly INITIATED_BY_PEPPER_SAVE.
+ DOWNLOAD_SOURCE_UNUSED_3,
+
+ // A request that was initiated as a result of resuming an interrupted
+ // download.
+ INITIATED_BY_RESUMPTION,
+
DOWNLOAD_SOURCE_LAST_ENTRY
};
@@ -141,8 +156,11 @@ void RecordBandwidth(double actual_bandwidth, double potential_bandwidth);
// download completed.
void RecordOpen(const base::Time& end, bool first);
-// Record whether or not the server accepts ranges, and the download size.
-void RecordAcceptsRanges(const std::string& accepts_ranges, int64 download_len);
+// Record whether or not the server accepts ranges, and the download size. Also
+// counts if a strong ETag is supplied. The combination of range request support
+// and ETag indicates downloads that are candidates for partial resumption.
+void RecordAcceptsRanges(const std::string& accepts_ranges, int64 download_len,
+ const std::string& etag);
// Record the number of downloads removed by ClearAll.
void RecordClearAllSize(int size);
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | content/browser/download/download_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698