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

Unified Diff: chrome/browser/download/download_util.h

Issue 9316116: Isolate initiation counts for downloads to their own histograms and improve (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to TOT. Created 8 years, 10 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 | « chrome/browser/download/download_resource_throttle.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_util.h
diff --git a/chrome/browser/download/download_util.h b/chrome/browser/download/download_util.h
index 6df96e46bce3154890153569f2d26c8d227da0f9..7edd759933077dfe33f82ae46d87fc08c86a6444 100644
--- a/chrome/browser/download/download_util.h
+++ b/chrome/browser/download/download_util.h
@@ -174,23 +174,37 @@ void RecordShelfClose(int size, int in_progress, bool autoclose);
// Used for counting UMA stats. Similar to content's
// download_stats::DownloadCountTypes but from the chrome layer.
enum ChromeDownloadCountTypes {
+ // A download *would* have been initiated, but it was blocked
+ // by the DownloadThrottlingResourceHandler.
+ BLOCKED_BY_THROTTLING = 0,
+
+ DOWNLOAD_COUNT_TYPES_LAST_ENTRY
+};
+
+// Used for counting UMA stats. Similar to content's
+// download_stats::DownloadInitiattionSources but from the chrome layer.
+enum ChromeDownloadInitiationSources {
cbentzel 2012/02/07 20:27:33 Nit: why not ChromeDownloadSources? Or name Record
Randy Smith (Not in Mondays) 2012/02/09 21:48:02 Tried to regularize naming; let me know if you hav
// The download was initiated by navigating to a URL (e.g. by user click).
- INITIATED_BY_NAVIGATION_COUNT = 0,
+ INITIATED_BY_NAVIGATION = 0,
// The download was initiated by invoking a context menu within a page.
- INITIATED_BY_CONTEXT_MENU_COUNT,
+ INITIATED_BY_CONTEXT_MENU,
// The download was initiated by the WebStore installer.
- INITIATED_BY_WEBSTORE_INSTALLER_COUNT,
+ INITIATED_BY_WEBSTORE_INSTALLER,
// The download was initiated by the ImageBurner (cros).
- INITIATED_BY_IMAGE_BURNER_COUNT,
+ INITIATED_BY_IMAGE_BURNER,
- DOWNLOAD_COUNT_TYPES_LAST_ENTRY,
+ DOWNLOAD_INITIATION_SOURCES_LAST_ENTRY,
};
+// Increment one of the above counts.
void RecordDownloadCount(ChromeDownloadCountTypes type);
+// Record initiation of a download from a specific source.
+void RecordDownloadSource(ChromeDownloadInitiationSources source);
+
} // namespace download_util
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_UTIL_H_
« no previous file with comments | « chrome/browser/download/download_resource_throttle.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698