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

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

Issue 14947007: [Downloads] Allow acquiring dangerous download file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix UMA and support stealing interrupted downloads Created 7 years, 7 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
Index: content/browser/download/download_stats.h
diff --git a/content/browser/download/download_stats.h b/content/browser/download/download_stats.h
index 282d0e0b39d22996e09807b182af8d021f1888c0..8b4f09466dbab2702351ed7cfc5c69f55b5f659e 100644
--- a/content/browser/download/download_stats.h
+++ b/content/browser/download/download_stats.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "content/common/content_export.h"
+#include "content/public/browser/download_danger_type.h"
#include "content/public/browser/download_interrupt_reasons.h"
namespace base {
@@ -92,6 +93,14 @@ enum DownloadSource {
DOWNLOAD_SOURCE_LAST_ENTRY
};
+enum DownloadDiscardReason {
+ // The download is being discarded due to a user action.
+ DOWNLOAD_DISCARD_DUE_TO_USER_ACTION,
+
+ // The download is being discarded due to the browser being shut down.
+ DOWNLOAD_DISCARD_DUE_TO_SHUTDOWN
+};
+
// Increment one of the above counts.
void RecordDownloadCount(DownloadCountTypes type);
@@ -106,6 +115,13 @@ void RecordDownloadInterrupted(DownloadInterruptReason reason,
int64 received,
int64 total);
+// Record a dangerous download accept event.
+void RecordDangerousDownloadAccept(DownloadDangerType danger_type);
+
+// Record a dangerous download discard event.
+void RecordDangerousDownloadDiscard(DownloadDiscardReason reason,
+ DownloadDangerType danger_type);
+
// Records the mime type of the download.
void RecordDownloadMimeType(const std::string& mime_type);

Powered by Google App Engine
This is Rietveld 408576698