Isolate initiation counts for downloads to their own histograms and improve
naming.
BUG=None
Review URL: http://codereview.chromium.org/9316116
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122159 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
index 57fa239..e0f59b88 100644
--- a/content/browser/download/download_stats.cc
+++ b/content/browser/download/download_stats.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -24,6 +24,11 @@
"Download.Counts", type, DOWNLOAD_COUNT_TYPES_LAST_ENTRY);
}
+void RecordDownloadSource(DownloadSource source) {
+ UMA_HISTOGRAM_ENUMERATION(
+ "Download.Sources", source, DOWNLOAD_SOURCE_LAST_ENTRY);
+}
+
void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len) {
RecordDownloadCount(COMPLETED_COUNT);
UMA_HISTOGRAM_LONG_TIMES("Download.Time", (base::TimeTicks::Now() - start));