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

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

Issue 11478034: Add UMA for measuring Content-Dispostion header use and abuse. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Suppress accidental trigraph Created 8 years 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 | Annotate | Revision Log
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 <string> 10 #include <string>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len); 103 void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len);
104 104
105 // Record INTERRUPTED_COUNT, |reason|, |received| and |total| bytes. 105 // Record INTERRUPTED_COUNT, |reason|, |received| and |total| bytes.
106 void RecordDownloadInterrupted(DownloadInterruptReason reason, 106 void RecordDownloadInterrupted(DownloadInterruptReason reason,
107 int64 received, 107 int64 received,
108 int64 total); 108 int64 total);
109 109
110 // Records the mime type of the download. 110 // Records the mime type of the download.
111 void RecordDownloadMimeType(const std::string& mime_type); 111 void RecordDownloadMimeType(const std::string& mime_type);
112 112
113 // Records usage of Content-Disposition header.
114 void RecordDownloadContentDisposition(const std::string& content_disposition);
115
113 // Record WRITE_SIZE_COUNT and data_len. 116 // Record WRITE_SIZE_COUNT and data_len.
114 void RecordDownloadWriteSize(size_t data_len); 117 void RecordDownloadWriteSize(size_t data_len);
115 118
116 // Record WRITE_LOOP_COUNT and number of loops. 119 // Record WRITE_LOOP_COUNT and number of loops.
117 void RecordDownloadWriteLoopCount(int count); 120 void RecordDownloadWriteLoopCount(int count);
118 121
119 // Record the number of buffers piled up by the IO thread 122 // Record the number of buffers piled up by the IO thread
120 // before the file thread gets to draining them. 123 // before the file thread gets to draining them.
121 void RecordFileThreadReceiveBuffers(size_t num_buffers); 124 void RecordFileThreadReceiveBuffers(size_t num_buffers);
122 125
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 SAVE_PACKAGE_WRITE_TO_FAILED, 171 SAVE_PACKAGE_WRITE_TO_FAILED,
169 172
170 SAVE_PACKAGE_LAST_ENTRY 173 SAVE_PACKAGE_LAST_ENTRY
171 }; 174 };
172 175
173 void RecordSavePackageEvent(SavePackageEvent event); 176 void RecordSavePackageEvent(SavePackageEvent event);
174 177
175 } // namespace content 178 } // namespace content
176 179
177 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ 180 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | content/browser/download/download_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698