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

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

Issue 8008021: Add new UMA stats to get a handle on Downloads UI Usage (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixed tests Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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
11 #include <string> 11 #include <string>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 15
16 namespace base { 16 namespace base {
17 class Time;
17 class TimeTicks; 18 class TimeTicks;
18 } 19 }
19 20
20 namespace download_stats { 21 namespace download_stats {
21 22
22 // We keep a count of how often various events occur in the 23 // We keep a count of how often various events occur in the
23 // histogram "Download.Counts". 24 // histogram "Download.Counts".
24 enum DownloadCountTypes { 25 enum DownloadCountTypes {
25 // The download was initiated by navigating to a URL (e.g. by user 26 // The download was initiated by navigating to a URL (e.g. by user
26 // click). 27 // click).
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 82
82 // Records the mime type of the download. 83 // Records the mime type of the download.
83 void RecordDownloadMimeType(const std::string& mime_type); 84 void RecordDownloadMimeType(const std::string& mime_type);
84 85
85 // Record WRITE_SIZE_COUNT and data_len. 86 // Record WRITE_SIZE_COUNT and data_len.
86 void RecordDownloadWriteSize(size_t data_len); 87 void RecordDownloadWriteSize(size_t data_len);
87 88
88 // Record WRITE_LOOP_COUNT and number of loops. 89 // Record WRITE_LOOP_COUNT and number of loops.
89 void RecordDownloadWriteLoopCount(int count); 90 void RecordDownloadWriteLoopCount(int count);
90 91
92 // Record the time of both the first open and all subsequent opens since the
93 // download completed.
94 void RecordOpen(const base::Time& end, bool first);
95
96 // Record the number of items loaded from the history db.
97 void RecordHistorySize(int size);
98
99 // Record the number of items that are in the history at the time that a
100 // new download begins.
101 void RecordHistorySize2(int size);
102
103 // Record the number of items showing in the shelf when it closes.
104 void RecordShelfSize(int size);
105
106 // Record the number of pending items showing in the shelf when it closes.
107 void RecordShelfPendingSize(int size);
108
109 // Record the number of downloads removed by ClearAll.
110 void RecordClearAllSize(int size);
111
112 // Record the number of completed unopened downloads when a download is opened.
113 void RecordOpensOutstanding(int size);
114
91 } // namespace download_stats 115 } // namespace download_stats
92 116
93 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ 117 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698