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

Side by Side Diff: chrome/browser/android/download/download_controller.h

Issue 2111983002: Record one more reason that download is canceled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // This class pairs with DownloadController on Java side to forward requests 5 // This class pairs with DownloadController on Java side to forward requests
6 // for GET downloads to the current DownloadListener. POST downloads are 6 // for GET downloads to the current DownloadListener. POST downloads are
7 // handled on the native side. 7 // handled on the native side.
8 // 8 //
9 // Both classes are Singleton classes. C++ object owns Java object. 9 // Both classes are Singleton classes. C++ object owns Java object.
10 // 10 //
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // UMA histogram enum for download cancellation reasons. Keep this 53 // UMA histogram enum for download cancellation reasons. Keep this
54 // in sync with MobileDownloadCancelReason in histograms.xml. This should be 54 // in sync with MobileDownloadCancelReason in histograms.xml. This should be
55 // append only. 55 // append only.
56 enum DownloadCancelReason { 56 enum DownloadCancelReason {
57 CANCEL_REASON_NOT_CANCELED = 0, 57 CANCEL_REASON_NOT_CANCELED = 0,
58 CANCEL_REASON_ACTION_BUTTON, 58 CANCEL_REASON_ACTION_BUTTON,
59 CANCEL_REASON_NOTIFICATION_DISMISSED, 59 CANCEL_REASON_NOTIFICATION_DISMISSED,
60 CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED, 60 CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED,
61 CANCEL_REASON_NO_STORAGE_PERMISSION, 61 CANCEL_REASON_NO_STORAGE_PERMISSION,
62 CANCEL_REASON_DANGEROUS_INFOBAR_DISMISSED,
62 CANCEL_REASON_MAX 63 CANCEL_REASON_MAX
63 }; 64 };
64 static void RecordDownloadCancelReason(DownloadCancelReason reason); 65 static void RecordDownloadCancelReason(DownloadCancelReason reason);
65 66
66 private: 67 private:
67 struct JavaObject; 68 struct JavaObject;
68 friend struct base::DefaultSingletonTraits<DownloadController>; 69 friend struct base::DefaultSingletonTraits<DownloadController>;
69 DownloadController(); 70 DownloadController();
70 ~DownloadController() override; 71 ~DownloadController() override;
71 72
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 JavaObject* GetJavaObject(); 110 JavaObject* GetJavaObject();
110 111
111 JavaObject* java_object_; 112 JavaObject* java_object_;
112 113
113 std::string default_file_name_; 114 std::string default_file_name_;
114 115
115 DISALLOW_COPY_AND_ASSIGN(DownloadController); 116 DISALLOW_COPY_AND_ASSIGN(DownloadController);
116 }; 117 };
117 118
118 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_H_ 119 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/download/download_controller.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698