| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 167 |
| 168 // No Content-Length response header. | 168 // No Content-Length response header. |
| 169 FALLBACK_REASON_CONTENT_LENGTH_HEADER, | 169 FALLBACK_REASON_CONTENT_LENGTH_HEADER, |
| 170 | 170 |
| 171 // File size is not complied to finch configuration. | 171 // File size is not complied to finch configuration. |
| 172 FALLBACK_REASON_FILE_SIZE, | 172 FALLBACK_REASON_FILE_SIZE, |
| 173 | 173 |
| 174 // The HTTP connection type does not meet the requirement. | 174 // The HTTP connection type does not meet the requirement. |
| 175 FALLBACK_REASON_CONNECTION_TYPE, | 175 FALLBACK_REASON_CONNECTION_TYPE, |
| 176 | 176 |
| 177 // The remaining time does not meet the requirement. |
| 178 FALLBACK_REASON_REMAINING_TIME, |
| 179 |
| 177 // Last entry of the enum. | 180 // Last entry of the enum. |
| 178 COUNT, | 181 COUNT, |
| 179 }; | 182 }; |
| 180 | 183 |
| 181 // Increment one of the above counts. | 184 // Increment one of the above counts. |
| 182 void RecordDownloadCount(DownloadCountTypes type); | 185 void RecordDownloadCount(DownloadCountTypes type); |
| 183 | 186 |
| 184 // Record initiation of a download from a specific source. | 187 // Record initiation of a download from a specific source. |
| 185 void RecordDownloadSource(DownloadSource source); | 188 void RecordDownloadSource(DownloadSource source); |
| 186 | 189 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 317 |
| 315 void RecordDownloadConnectionSecurity(const GURL& download_url, | 318 void RecordDownloadConnectionSecurity(const GURL& download_url, |
| 316 const std::vector<GURL>& url_chain); | 319 const std::vector<GURL>& url_chain); |
| 317 | 320 |
| 318 void RecordDownloadSourcePageTransitionType( | 321 void RecordDownloadSourcePageTransitionType( |
| 319 const base::Optional<ui::PageTransition>& transition); | 322 const base::Optional<ui::PageTransition>& transition); |
| 320 | 323 |
| 321 } // namespace content | 324 } // namespace content |
| 322 | 325 |
| 323 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 326 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |