Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: content/browser/download/download_stats.h

Issue 2712713007: Make DownloadFileImpl handle multiple byte streams. (Closed)
Patch Set: Remove the AppendDataToFile call, fix the browsertest. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Record how long we block the file thread at a time. 190 // Record how long we block the file thread at a time.
191 void RecordContiguousWriteTime(base::TimeDelta time_blocked); 191 void RecordContiguousWriteTime(base::TimeDelta time_blocked);
192 192
193 // Record the percentage of time we had to block the network (i.e. 193 // Record the percentage of time we had to block the network (i.e.
194 // how often, for each download, something other than the network 194 // how often, for each download, something other than the network
195 // was the bottleneck). 195 // was the bottleneck).
196 void RecordNetworkBlockage(base::TimeDelta resource_handler_lifetime, 196 void RecordNetworkBlockage(base::TimeDelta resource_handler_lifetime,
197 base::TimeDelta resource_handler_blocked_time); 197 base::TimeDelta resource_handler_blocked_time);
198 198
199 // Record overall bandwidth stats at the file end. 199 // Record overall bandwidth stats at the file end.
200 // Does not count in any hash computation or file open/close time.
200 void RecordFileBandwidth(size_t length, 201 void RecordFileBandwidth(size_t length,
201 base::TimeDelta disk_write_time, 202 base::TimeDelta disk_write_time,
202 base::TimeDelta elapsed_time); 203 base::TimeDelta elapsed_time);
203 204
204 // Record the result of a download file rename. 205 // Record the result of a download file rename.
205 void RecordDownloadFileRenameResultAfterRetry( 206 void RecordDownloadFileRenameResultAfterRetry(
206 base::TimeDelta time_since_first_failure, 207 base::TimeDelta time_since_first_failure,
207 DownloadInterruptReason interrupt_reason); 208 DownloadInterruptReason interrupt_reason);
208 209
209 enum SavePackageEvent { 210 enum SavePackageEvent {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 243
243 void RecordDownloadConnectionSecurity(const GURL& download_url, 244 void RecordDownloadConnectionSecurity(const GURL& download_url,
244 const std::vector<GURL>& url_chain); 245 const std::vector<GURL>& url_chain);
245 246
246 void RecordDownloadSourcePageTransitionType( 247 void RecordDownloadSourcePageTransitionType(
247 const base::Optional<ui::PageTransition>& transition); 248 const base::Optional<ui::PageTransition>& transition);
248 249
249 } // namespace content 250 } // namespace content
250 251
251 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ 252 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_file_unittest.cc ('k') | content/browser/download/mock_download_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698