| 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 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 // Record the number of downloads removed by ClearAll. | 135 // Record the number of downloads removed by ClearAll. |
| 136 void RecordClearAllSize(int size); | 136 void RecordClearAllSize(int size); |
| 137 | 137 |
| 138 // Record the number of completed unopened downloads when a download is opened. | 138 // Record the number of completed unopened downloads when a download is opened. |
| 139 void RecordOpensOutstanding(int size); | 139 void RecordOpensOutstanding(int size); |
| 140 | 140 |
| 141 // Record how long we block the file thread at a time. | 141 // Record how long we block the file thread at a time. |
| 142 void RecordContiguousWriteTime(base::TimeDelta time_blocked); | 142 void RecordContiguousWriteTime(base::TimeDelta time_blocked); |
| 143 | 143 |
| 144 // Record overall bandwidth stats at the network end. | 144 // Record the percentage of time we had to block the network (i.e. |
| 145 void RecordNetworkBandwidth(size_t length, | 145 // how often, for each download, something other than the network |
| 146 base::TimeDelta elapsed_time, | 146 // was the bottleneck). |
| 147 base::TimeDelta paused_time); | 147 void RecordNetworkBlockage(base::TimeDelta resource_handler_lifetime, |
| 148 base::TimeDelta resource_handler_blocked_time); |
| 148 | 149 |
| 149 // Record overall bandwidth stats at the file end. | 150 // Record overall bandwidth stats at the file end. |
| 150 void RecordFileBandwidth(size_t length, | 151 void RecordFileBandwidth(size_t length, |
| 151 base::TimeDelta disk_write_time, | 152 base::TimeDelta disk_write_time, |
| 152 base::TimeDelta elapsed_time); | 153 base::TimeDelta elapsed_time); |
| 153 | 154 |
| 154 enum SavePackageEvent { | 155 enum SavePackageEvent { |
| 155 // The user has started to save a page as a package. | 156 // The user has started to save a page as a package. |
| 156 SAVE_PACKAGE_STARTED, | 157 SAVE_PACKAGE_STARTED, |
| 157 | 158 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 168 SAVE_PACKAGE_WRITE_TO_FAILED, | 169 SAVE_PACKAGE_WRITE_TO_FAILED, |
| 169 | 170 |
| 170 SAVE_PACKAGE_LAST_ENTRY | 171 SAVE_PACKAGE_LAST_ENTRY |
| 171 }; | 172 }; |
| 172 | 173 |
| 173 void RecordSavePackageEvent(SavePackageEvent event); | 174 void RecordSavePackageEvent(SavePackageEvent event); |
| 174 | 175 |
| 175 } // namespace download_stats | 176 } // namespace download_stats |
| 176 | 177 |
| 177 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 178 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
| OLD | NEW |