OLD | NEW |
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 // Holds helpers for gathering UMA stats about downloads. | 5 // Holds helpers for gathering UMA stats about downloads. |
6 | 6 |
7 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 7 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
8 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 8 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML = 0, | 78 INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML = 0, |
79 | 79 |
80 // The download was initiated by a drag and drop from a drag-and-drop | 80 // The download was initiated by a drag and drop from a drag-and-drop |
81 // enabled web application. | 81 // enabled web application. |
82 INITIATED_BY_DRAG_N_DROP, | 82 INITIATED_BY_DRAG_N_DROP, |
83 | 83 |
84 // The download was initiated by explicit RPC from the renderer process | 84 // The download was initiated by explicit RPC from the renderer process |
85 // (e.g. by Alt-click) through the IPC ViewHostMsg_DownloadUrl. | 85 // (e.g. by Alt-click) through the IPC ViewHostMsg_DownloadUrl. |
86 INITIATED_BY_RENDERER, | 86 INITIATED_BY_RENDERER, |
87 | 87 |
88 // The download was initiated by a renderer or plugin process through | |
89 // the IPC ViewHostMsg_SaveURLAs; currently this is only used by the | |
90 // Pepper plugin API. | |
91 INITIATED_BY_PEPPER_SAVE, | |
92 | |
93 DOWNLOAD_SOURCE_LAST_ENTRY | 88 DOWNLOAD_SOURCE_LAST_ENTRY |
94 }; | 89 }; |
95 | 90 |
96 enum DownloadDiscardReason { | 91 enum DownloadDiscardReason { |
97 // The download is being discarded due to a user action. | 92 // The download is being discarded due to a user action. |
98 DOWNLOAD_DISCARD_DUE_TO_USER_ACTION, | 93 DOWNLOAD_DISCARD_DUE_TO_USER_ACTION, |
99 | 94 |
100 // The download is being discarded due to the browser being shut down. | 95 // The download is being discarded due to the browser being shut down. |
101 DOWNLOAD_DISCARD_DUE_TO_SHUTDOWN | 96 DOWNLOAD_DISCARD_DUE_TO_SHUTDOWN |
102 }; | 97 }; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 SAVE_PACKAGE_WRITE_TO_FAILED, | 181 SAVE_PACKAGE_WRITE_TO_FAILED, |
187 | 182 |
188 SAVE_PACKAGE_LAST_ENTRY | 183 SAVE_PACKAGE_LAST_ENTRY |
189 }; | 184 }; |
190 | 185 |
191 void RecordSavePackageEvent(SavePackageEvent event); | 186 void RecordSavePackageEvent(SavePackageEvent event); |
192 | 187 |
193 } // namespace content | 188 } // namespace content |
194 | 189 |
195 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 190 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
OLD | NEW |