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 <stddef.h> | 10 #include <stddef.h> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 // Count of new downloads. | 97 // Count of new downloads. |
98 NEW_DOWNLOAD_COUNT, | 98 NEW_DOWNLOAD_COUNT, |
99 | 99 |
100 // Count of new downloads that are started in normal profile. | 100 // Count of new downloads that are started in normal profile. |
101 NEW_DOWNLOAD_COUNT_NORMAL_PROFILE, | 101 NEW_DOWNLOAD_COUNT_NORMAL_PROFILE, |
102 | 102 |
103 // Downloads that are actually completed in normal profile. | 103 // Downloads that are actually completed in normal profile. |
104 COMPLETED_COUNT_NORMAL_PROFILE, | 104 COMPLETED_COUNT_NORMAL_PROFILE, |
105 | 105 |
| 106 // Downloads that are completed with a content length mismatch error. |
| 107 COMPLETED_WITH_CONTENT_LENGTH_MISMATCH_COUNT, |
| 108 |
| 109 // After a download is interrupted with a content length mismatch error, more |
| 110 // bytes are received when resuming the download. |
| 111 MORE_BYTES_RECEIVED_AFTER_CONTENT_LENGTH_MISMATCH_COUNT, |
| 112 |
| 113 // After a download is interrupted with a content length mismatch error, no |
| 114 // bytes are received when resuming the download. |
| 115 NO_BYTES_RECEIVED_AFTER_CONTENT_LENGTH_MISMATCH_COUNT, |
| 116 |
106 DOWNLOAD_COUNT_TYPES_LAST_ENTRY | 117 DOWNLOAD_COUNT_TYPES_LAST_ENTRY |
107 }; | 118 }; |
108 | 119 |
109 enum DownloadSource { | 120 enum DownloadSource { |
110 // The download was initiated when the SavePackage system rejected | 121 // The download was initiated when the SavePackage system rejected |
111 // a Save Page As ... by returning false from | 122 // a Save Page As ... by returning false from |
112 // SavePackage::IsSaveableContents(). | 123 // SavePackage::IsSaveableContents(). |
113 INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML = 0, | 124 INITIATED_BY_SAVE_PACKAGE_ON_NON_HTML = 0, |
114 | 125 |
115 // The download was initiated by a drag and drop from a drag-and-drop | 126 // The download was initiated by a drag and drop from a drag-and-drop |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 332 |
322 void RecordDownloadConnectionSecurity(const GURL& download_url, | 333 void RecordDownloadConnectionSecurity(const GURL& download_url, |
323 const std::vector<GURL>& url_chain); | 334 const std::vector<GURL>& url_chain); |
324 | 335 |
325 void RecordDownloadSourcePageTransitionType( | 336 void RecordDownloadSourcePageTransitionType( |
326 const base::Optional<ui::PageTransition>& transition); | 337 const base::Optional<ui::PageTransition>& transition); |
327 | 338 |
328 } // namespace content | 339 } // namespace content |
329 | 340 |
330 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 341 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
OLD | NEW |