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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 INTERRUPTED_AT_END_COUNT, | 57 INTERRUPTED_AT_END_COUNT, |
58 | 58 |
59 // Counts errors due to writes to BaseFiles that have been detached already. | 59 // Counts errors due to writes to BaseFiles that have been detached already. |
60 // This can happen when saving web pages as complete packages. It happens | 60 // This can happen when saving web pages as complete packages. It happens |
61 // when we get messages to append data to files that have already finished and | 61 // when we get messages to append data to files that have already finished and |
62 // been detached, but haven't yet been removed from the list of files in | 62 // been detached, but haven't yet been removed from the list of files in |
63 // progress. | 63 // progress. |
64 APPEND_TO_DETACHED_FILE_COUNT, | 64 APPEND_TO_DETACHED_FILE_COUNT, |
65 | 65 |
66 // Counts the number of instances where the downloaded file is missing after a | 66 // Counts the number of instances where the downloaded file is missing after a |
67 // successful invocation of win_util::ScanAndSaveDownloadedFile(). | 67 // successful invocation of ScanAndSaveDownloadedFile(). |
68 FILE_MISSING_AFTER_SUCCESSFUL_SCAN_COUNT, | 68 FILE_MISSING_AFTER_SUCCESSFUL_SCAN_COUNT, |
69 | 69 |
70 DOWNLOAD_COUNT_TYPES_LAST_ENTRY | 70 DOWNLOAD_COUNT_TYPES_LAST_ENTRY |
71 }; | 71 }; |
72 | 72 |
73 enum DownloadSource { | 73 enum DownloadSource { |
74 // The download was initiated when the SavePackage system rejected | 74 // The download was initiated when the SavePackage system rejected |
75 // a Save Page As ... by returning false from | 75 // a Save Page As ... by returning false from |
76 // SavePackage::IsSaveableContents(). | 76 // SavePackage::IsSaveableContents(). |
77 INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML = 0, | 77 INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML = 0, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 SAVE_PACKAGE_WRITE_TO_FAILED, | 172 SAVE_PACKAGE_WRITE_TO_FAILED, |
173 | 173 |
174 SAVE_PACKAGE_LAST_ENTRY | 174 SAVE_PACKAGE_LAST_ENTRY |
175 }; | 175 }; |
176 | 176 |
177 void RecordSavePackageEvent(SavePackageEvent event); | 177 void RecordSavePackageEvent(SavePackageEvent event); |
178 | 178 |
179 } // namespace content | 179 } // namespace content |
180 | 180 |
181 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 181 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
OLD | NEW |