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

Side by Side Diff: content/public/browser/android/download_controller_android.h

Issue 2117833002: Record one more reason that download is canceled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/browser/download_item.h" 10 #include "content/public/browser/download_item.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // UMA histogram enum for download cancellation reasons. Keep this 28 // UMA histogram enum for download cancellation reasons. Keep this
29 // in sync with MobileDownloadCancelReason in histograms.xml. This should be 29 // in sync with MobileDownloadCancelReason in histograms.xml. This should be
30 // append only. 30 // append only.
31 enum DownloadCancelReason { 31 enum DownloadCancelReason {
32 CANCEL_REASON_NOT_CANCELED = 0, 32 CANCEL_REASON_NOT_CANCELED = 0,
33 CANCEL_REASON_ACTION_BUTTON, 33 CANCEL_REASON_ACTION_BUTTON,
34 CANCEL_REASON_NOTIFICATION_DISMISSED, 34 CANCEL_REASON_NOTIFICATION_DISMISSED,
35 CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED, 35 CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED,
36 CANCEL_REASON_NO_STORAGE_PERMISSION, 36 CANCEL_REASON_NO_STORAGE_PERMISSION,
37 CANCEL_REASON_DANGEROUS_DOWNLOAD_INFOBAR_DISMISSED,
37 CANCEL_REASON_MAX 38 CANCEL_REASON_MAX
38 }; 39 };
39 static void RecordDownloadCancelReason(DownloadCancelReason reason); 40 static void RecordDownloadCancelReason(DownloadCancelReason reason);
40 41
41 // Starts a new download request with Android. Should be called on the 42 // Starts a new download request with Android. Should be called on the
42 // UI thread. 43 // UI thread.
43 virtual void CreateGETDownload(int render_process_id, int render_view_id, 44 virtual void CreateGETDownload(int render_process_id, int render_view_id,
44 int request_id, bool must_download) = 0; 45 int request_id, bool must_download) = 0;
45 46
46 // Should be called when a download is started. It can be either a GET 47 // Should be called when a download is started. It can be either a GET
(...skipping 29 matching lines...) Expand all
76 virtual void SetDefaultDownloadFileName(const std::string& file_name) {} 77 virtual void SetDefaultDownloadFileName(const std::string& file_name) {}
77 78
78 protected: 79 protected:
79 ~DownloadControllerAndroid() override {}; 80 ~DownloadControllerAndroid() override {};
80 static DownloadControllerAndroid* download_controller_; 81 static DownloadControllerAndroid* download_controller_;
81 }; 82 };
82 83
83 } // namespace content 84 } // namespace content
84 85
85 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_ 86 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_DOWNLOAD_CONTROLLER_ANDROID_H_
OLDNEW
« 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