Index: chrome/browser/download/download_stats.h |
diff --git a/chrome/browser/download/download_stats.h b/chrome/browser/download/download_stats.h |
index b84091fa1be97327565d51c1425e17d41fd44d8a..ece9243b7d47b0c2fd4a39474830905d191c47e1 100644 |
--- a/chrome/browser/download/download_stats.h |
+++ b/chrome/browser/download/download_stats.h |
@@ -56,6 +56,23 @@ enum ChromeDownloadSource { |
CHROME_DOWNLOAD_SOURCE_LAST_ENTRY, |
}; |
+// How a download was opened. Note that a download could be opened multiple |
+// times. |
+enum ChromeDownloadOpenMethod { |
+ // The download was opened using the platform handler. There was no special |
+ // handling for this download. |
+ DOWNLOAD_OPEN_METHOD_DEFAULT_PLATFORM = 0, |
+ |
+ // The download was opened using the browser bypassing the system handler. |
+ DOWNLOAD_OPEN_METHOD_DEFAULT_BROWSER, |
+ |
+ // The user chose to open the download using the system handler even though |
+ // the preferred method was to open the download using the browser. |
+ DOWNLOAD_OPEN_METHOD_USER_PLATFORM, |
+ |
+ DOWNLOAD_OPEN_METHOD_LAST_ENTRY |
+}; |
+ |
// Increment one of the above counts. |
void RecordDownloadCount(ChromeDownloadCountTypes type); |
@@ -66,4 +83,7 @@ void RecordDownloadSource(ChromeDownloadSource source); |
void RecordOpenedDangerousConfirmDialog( |
content::DownloadDangerType danger_type); |
+// Record how a download was opened. |
+void RecordDownloadOpenMethod(ChromeDownloadOpenMethod open_method); |
+ |
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |