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

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

Issue 9639001: Move download interrupt reasons to content\public (the enum that's used by chrome). The rest keep i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 8 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 | 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 #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 #include "content/browser/download/interrupt_reasons.h" 15 #include "content/public/browser/download_interrupt_reasons.h"
16 16
17 namespace base { 17 namespace base {
18 class Time; 18 class Time;
19 class TimeTicks; 19 class TimeTicks;
20 } 20 }
21 21
22 namespace download_stats { 22 namespace download_stats {
23 23
24 // We keep a count of how often various events occur in the 24 // We keep a count of how often various events occur in the
25 // histogram "Download.Counts". 25 // histogram "Download.Counts".
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Increment one of the above counts. 92 // Increment one of the above counts.
93 void RecordDownloadCount(DownloadCountTypes type); 93 void RecordDownloadCount(DownloadCountTypes type);
94 94
95 // Record initiation of a download from a specific source. 95 // Record initiation of a download from a specific source.
96 void RecordDownloadSource(DownloadSource source); 96 void RecordDownloadSource(DownloadSource source);
97 97
98 // Record COMPLETED_COUNT and how long the download took. 98 // Record COMPLETED_COUNT and how long the download took.
99 void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len); 99 void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len);
100 100
101 // Record INTERRUPTED_COUNT, |reason|, |received| and |total| bytes. 101 // Record INTERRUPTED_COUNT, |reason|, |received| and |total| bytes.
102 void RecordDownloadInterrupted(InterruptReason reason, 102 void RecordDownloadInterrupted(content::DownloadInterruptReason reason,
103 int64 received, 103 int64 received,
104 int64 total); 104 int64 total);
105 105
106 // Records the mime type of the download. 106 // Records the mime type of the download.
107 void RecordDownloadMimeType(const std::string& mime_type); 107 void RecordDownloadMimeType(const std::string& mime_type);
108 108
109 // Record WRITE_SIZE_COUNT and data_len. 109 // Record WRITE_SIZE_COUNT and data_len.
110 void RecordDownloadWriteSize(size_t data_len); 110 void RecordDownloadWriteSize(size_t data_len);
111 111
112 // Record WRITE_LOOP_COUNT and number of loops. 112 // Record WRITE_LOOP_COUNT and number of loops.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 SAVE_PACKAGE_WRITE_TO_FAILED, 154 SAVE_PACKAGE_WRITE_TO_FAILED,
155 155
156 SAVE_PACKAGE_LAST_ENTRY 156 SAVE_PACKAGE_LAST_ENTRY
157 }; 157 };
158 158
159 void RecordSavePackageEvent(SavePackageEvent event); 159 void RecordSavePackageEvent(SavePackageEvent event);
160 160
161 } // namespace download_stats 161 } // namespace download_stats
162 162
163 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_ 163 #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