1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 /** @fileoverview Externs generated from namespace: metricsPrivate */
8 * Describes the type of metric that is to be collected.
22 chrome
.metricsPrivate
= {};
25 * Returns true if the user opted in to sending crash reports.
26 * @param {Function} callback
28 chrome
.metricsPrivate
.getIsCrashReportingEnabled = function(callback
) {};
31 * Returns the group name chosen for the named trial, or the empty string if
32 * the trial does not exist or is not enabled.
33 * @param {string} name
34 * @param {Function} callback
36 chrome
.metricsPrivate
.getFieldTrial = function(name
, callback
) {};
39 * Returns variation parameters for the named trial if available, or undefined
41 * @param {string} name
42 * @param {Function} callback
44 chrome
.metricsPrivate
.getVariationParams = function(name
, callback
) {};
47 * Records an action performed by the user.
48 * @param {string} name
50 chrome
.metricsPrivate
.recordUserAction = function(name
) {};
53 * Records a percentage value from 1 to 100.
54 * @param {string} metricName
55 * @param {number} value
57 chrome
.metricsPrivate
.recordPercentage = function(metricName
, value
) {};
60 * Records a value than can range from 1 to 1,000,000.
61 * @param {string} metricName
62 * @param {number} value
64 chrome
.metricsPrivate
.recordCount = function(metricName
, value
) {};
67 * Records a value than can range from 1 to 100.
68 * @param {string} metricName
69 * @param {number} value
71 chrome
.metricsPrivate
.recordSmallCount = function(metricName
, value
) {};
74 * Records a value than can range from 1 to 10,000.
75 * @param {string} metricName
76 * @param {number} value
78 chrome
.metricsPrivate
.recordMediumCount = function(metricName
, value
) {};
81 * Records an elapsed time of no more than 10 seconds. The sample value is
82 * specified in milliseconds.
83 * @param {string} metricName
84 * @param {number} value
86 chrome
.metricsPrivate
.recordTime = function(metricName
, value
) {};
89 * Records an elapsed time of no more than 3 minutes. The sample value is
90 * specified in milliseconds.
91 * @param {string} metricName
92 * @param {number} value
94 chrome
.metricsPrivate
.recordMediumTime = function(metricName
, value
) {};
97 * Records an elapsed time of no more than 1 hour. The sample value is
98 * specified in milliseconds.
99 * @param {string} metricName
100 * @param {number} value
102 chrome
.metricsPrivate
.recordLongTime = function(metricName
, value
) {};
105 * Increments the count associated with |value| in the sparse histogram defined
106 * by the |metricName|.
107 * @param {string} metricName
108 * @param {number} value
110 chrome
.metricsPrivate
.recordSparseValue = function(metricName
, value
) {};
113 * Adds a value to the given metric.
114 * @param {MetricType} metric
115 * @param {number} value
117 chrome
.metricsPrivate
.recordValue = function(metric
, value
) {};