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 <string> | 10 #include <string> |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 | 158 |
159 // Record the bandwidth seen in DownloadResourceHandler | 159 // Record the bandwidth seen in DownloadResourceHandler |
160 // |actual_bandwidth| and |potential_bandwidth| are in bytes/second. | 160 // |actual_bandwidth| and |potential_bandwidth| are in bytes/second. |
161 void RecordBandwidth(double actual_bandwidth, double potential_bandwidth); | 161 void RecordBandwidth(double actual_bandwidth, double potential_bandwidth); |
162 | 162 |
163 // Record the time of both the first open and all subsequent opens since the | 163 // Record the time of both the first open and all subsequent opens since the |
164 // download completed. | 164 // download completed. |
165 void RecordOpen(const base::Time& end, bool first); | 165 void RecordOpen(const base::Time& end, bool first); |
166 | 166 |
167 // Record whether or not the server accepts ranges, and the download size. Also | 167 // Record whether or not the server accepts ranges, and the download size. Also |
168 // counts if a strong ETag is supplied. The combination of range request support | 168 // counts if a strong validator is supplied. The combination of range request |
169 // and ETag indicates downloads that are candidates for partial resumption. | 169 // support and ETag indicates downloads that are candidates for partial |
170 void RecordAcceptsRanges(const std::string& accepts_ranges, int64 download_len, | 170 // resumption. |
171 const std::string& etag); | 171 void RecordAcceptsRanges(const std::string& accepts_ranges, |
172 int64 download_len, | |
173 bool has_strong_validator); | |
Randy Smith (Not in Mondays)
2013/11/18 22:07:02
This change makes me wary because we're changing w
asanka
2013/11/19 23:53:48
I deprecated the old UMA and added a new one.
| |
172 | 174 |
173 // Record the number of downloads removed by ClearAll. | 175 // Record the number of downloads removed by ClearAll. |
174 void RecordClearAllSize(int size); | 176 void RecordClearAllSize(int size); |
175 | 177 |
176 // Record the number of completed unopened downloads when a download is opened. | 178 // Record the number of completed unopened downloads when a download is opened. |
177 void RecordOpensOutstanding(int size); | 179 void RecordOpensOutstanding(int size); |
178 | 180 |
179 // Record how long we block the file thread at a time. | 181 // Record how long we block the file thread at a time. |
180 void RecordContiguousWriteTime(base::TimeDelta time_blocked); | 182 void RecordContiguousWriteTime(base::TimeDelta time_blocked); |
181 | 183 |
(...skipping 25 matching lines...) Expand all Loading... | |
207 SAVE_PACKAGE_WRITE_TO_FAILED, | 209 SAVE_PACKAGE_WRITE_TO_FAILED, |
208 | 210 |
209 SAVE_PACKAGE_LAST_ENTRY | 211 SAVE_PACKAGE_LAST_ENTRY |
210 }; | 212 }; |
211 | 213 |
212 void RecordSavePackageEvent(SavePackageEvent event); | 214 void RecordSavePackageEvent(SavePackageEvent event); |
213 | 215 |
214 } // namespace content | 216 } // namespace content |
215 | 217 |
216 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ | 218 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ |
OLD | NEW |