| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // Record a dangerous download discard event. | 159 // Record a dangerous download discard event. |
| 160 void RecordDangerousDownloadDiscard( | 160 void RecordDangerousDownloadDiscard( |
| 161 DownloadDiscardReason reason, | 161 DownloadDiscardReason reason, |
| 162 DownloadDangerType danger_type, | 162 DownloadDangerType danger_type, |
| 163 const base::FilePath& file_path); | 163 const base::FilePath& file_path); |
| 164 | 164 |
| 165 // Records the mime type of the download. | 165 // Records the mime type of the download. |
| 166 void RecordDownloadMimeType(const std::string& mime_type); | 166 void RecordDownloadMimeType(const std::string& mime_type); |
| 167 | 167 |
| 168 // Records the mime type of the download for normal profile. |
| 169 void RecordDownloadMimeTypeForNormalProfile(const std::string& mime_type); |
| 170 |
| 168 // Records usage of Content-Disposition header. | 171 // Records usage of Content-Disposition header. |
| 169 void RecordDownloadContentDisposition(const std::string& content_disposition); | 172 void RecordDownloadContentDisposition(const std::string& content_disposition); |
| 170 | 173 |
| 171 // Record the number of buffers piled up by the IO thread | 174 // Record the number of buffers piled up by the IO thread |
| 172 // before the file thread gets to draining them. | 175 // before the file thread gets to draining them. |
| 173 void RecordFileThreadReceiveBuffers(size_t num_buffers); | 176 void RecordFileThreadReceiveBuffers(size_t num_buffers); |
| 174 | 177 |
| 175 // Record the time of both the first open and all subsequent opens since the | 178 // Record the time of both the first open and all subsequent opens since the |
| 176 // download completed. | 179 // download completed. |
| 177 void RecordOpen(const base::Time& end, bool first); | 180 void RecordOpen(const base::Time& end, bool first); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 246 |
| 244 void RecordDownloadConnectionSecurity(const GURL& download_url, | 247 void RecordDownloadConnectionSecurity(const GURL& download_url, |
| 245 const std::vector<GURL>& url_chain); | 248 const std::vector<GURL>& url_chain); |
| 246 | 249 |
| 247 void RecordDownloadSourcePageTransitionType( | 250 void RecordDownloadSourcePageTransitionType( |
| 248 const base::Optional<ui::PageTransition>& transition); | 251 const base::Optional<ui::PageTransition>& transition); |
| 249 | 252 |
| 250 } // namespace content | 253 } // namespace content |
| 251 | 254 |
| 252 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 255 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |