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

Unified Diff: content/public/browser/android/download_controller_android.h

Issue 2061063002: Add UMA for studying download cancellation reasons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/public/browser/android/download_controller_android.h
diff --git a/content/public/browser/android/download_controller_android.h b/content/public/browser/android/download_controller_android.h
index 7eda0e9774b3202944c1e47469fbde90f2ff309b..cbd829b4639406aa3622e773b645161eec6e4160 100644
--- a/content/public/browser/android/download_controller_android.h
+++ b/content/public/browser/android/download_controller_android.h
@@ -25,6 +25,19 @@ class CONTENT_EXPORT DownloadControllerAndroid : public DownloadItem::Observer {
static void SetDownloadControllerAndroid(
DownloadControllerAndroid* download_controller);
+ // UMA histogram enum for download cancellation reasons. Keep this
+ // in sync with MobileDownloadCancelReason in histograms.xml. This should be
+ // append only.
+ enum DownloadCancelReason {
+ CANCEL_REASON_NOT_CANCELED = 0,
+ CANCEL_REASON_ACTION_BUTTON,
+ CANCEL_REASON_NOTIFICATION_DISMISSED,
+ CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED,
+ CANCEL_REASON_NO_STORAGE_PERMISSION,
+ CANCEL_REASON_MAX
+ };
+ static void RecordDownloadCancelReason(DownloadCancelReason reason);
+
// Starts a new download request with Android. Should be called on the
// UI thread.
virtual void CreateGETDownload(int render_process_id, int render_view_id,
« no previous file with comments | « content/browser/android/download_controller_android_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698