| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 // File size is not complied to finch configuration. | 182 // File size is not complied to finch configuration. |
| 183 FALLBACK_REASON_FILE_SIZE, | 183 FALLBACK_REASON_FILE_SIZE, |
| 184 | 184 |
| 185 // The HTTP connection type does not meet the requirement. | 185 // The HTTP connection type does not meet the requirement. |
| 186 FALLBACK_REASON_CONNECTION_TYPE, | 186 FALLBACK_REASON_CONNECTION_TYPE, |
| 187 | 187 |
| 188 // The remaining time does not meet the requirement. | 188 // The remaining time does not meet the requirement. |
| 189 FALLBACK_REASON_REMAINING_TIME, | 189 FALLBACK_REASON_REMAINING_TIME, |
| 190 | 190 |
| 191 // The http method or url scheme does not meet the requirement. |
| 192 FALLBACK_REASON_HTTP_METHOD, |
| 193 |
| 191 // Last entry of the enum. | 194 // Last entry of the enum. |
| 192 COUNT, | 195 COUNT, |
| 193 }; | 196 }; |
| 194 | 197 |
| 195 // Increment one of the above counts. | 198 // Increment one of the above counts. |
| 196 void RecordDownloadCount(DownloadCountTypes type); | 199 void RecordDownloadCount(DownloadCountTypes type); |
| 197 | 200 |
| 198 // Record initiation of a download from a specific source. | 201 // Record initiation of a download from a specific source. |
| 199 void RecordDownloadSource(DownloadSource source); | 202 void RecordDownloadSource(DownloadSource source); |
| 200 | 203 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 const std::vector<GURL>& url_chain); | 343 const std::vector<GURL>& url_chain); |
| 341 | 344 |
| 342 void RecordDownloadSourcePageTransitionType( | 345 void RecordDownloadSourcePageTransitionType( |
| 343 const base::Optional<ui::PageTransition>& transition); | 346 const base::Optional<ui::PageTransition>& transition); |
| 344 | 347 |
| 345 void RecordDownloadHttpResponseCode(int response_code); | 348 void RecordDownloadHttpResponseCode(int response_code); |
| 346 | 349 |
| 347 } // namespace content | 350 } // namespace content |
| 348 | 351 |
| 349 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 352 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |