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

Side by Side Diff: third_party/closure_compiler/externs/metrics_private.js

Issue 2346683004: Update chrome.metricsPrivate externs and make closure fixes (Closed)
Patch Set: fix file manager test Created 4 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // This file was generated by:
6 // tools/json_schema_compiler/compiler.py.
7 // NOTE: The format of types has changed. 'FooType' is now
8 // 'chrome.metricsPrivate.FooType'.
9 // Please run the closure compiler before committing changes.
10 // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_comp ilation.md
11
5 /** @fileoverview Externs generated from namespace: metricsPrivate */ 12 /** @fileoverview Externs generated from namespace: metricsPrivate */
6 13
7 /** 14 /**
8 * Describes the type of metric that is to be collected.
9 * @typedef {{
10 * metricName: string,
11 * type: string,
12 * min: number,
13 * max: number,
14 * buckets: number
15 * }}
16 */
17 var MetricType;
18
19 /**
20 * @const 15 * @const
21 */ 16 */
22 chrome.metricsPrivate = {}; 17 chrome.metricsPrivate = {};
23 18
24 /** 19 /**
20 * @enum {string}
21 * @see https://developer.chrome.com/extensions/metricsPrivate#type-MetricTypeTy pe
22 */
23 chrome.metricsPrivate.MetricTypeType = {
24 HISTOGRAM_LOG: 'histogram-log',
25 HISTOGRAM_LINEAR: 'histogram-linear',
26 };
27
28 /**
29 * Describes the type of metric that is to be collected.
30 * @typedef {{
31 * metricName: string,
32 * type: !chrome.metricsPrivate.MetricTypeType,
33 * min: number,
34 * max: number,
35 * buckets: number
36 * }}
37 * @see https://developer.chrome.com/extensions/metricsPrivate#type-MetricType
38 */
39 chrome.metricsPrivate.MetricType;
40
41 /**
25 * Returns true if the user opted in to sending crash reports. 42 * Returns true if the user opted in to sending crash reports.
26 * @param {Function} callback 43 * @param {function(boolean):void} callback
44 * @see https://developer.chrome.com/extensions/metricsPrivate#method-getIsCrash ReportingEnabled
27 */ 45 */
28 chrome.metricsPrivate.getIsCrashReportingEnabled = function(callback) {}; 46 chrome.metricsPrivate.getIsCrashReportingEnabled = function(callback) {};
29 47
30 /** 48 /**
31 * Returns the group name chosen for the named trial, or the empty string if 49 * Returns the group name chosen for the named trial, or the empty string if the
32 * the trial does not exist or is not enabled. 50 * trial does not exist or is not enabled.
33 * @param {string} name 51 * @param {string} name
34 * @param {Function} callback 52 * @param {function(string):void} callback
53 * @see https://developer.chrome.com/extensions/metricsPrivate#method-getFieldTr ial
35 */ 54 */
36 chrome.metricsPrivate.getFieldTrial = function(name, callback) {}; 55 chrome.metricsPrivate.getFieldTrial = function(name, callback) {};
37 56
38 /** 57 /**
39 * Returns variation parameters for the named trial if available, or undefined 58 * Returns variation parameters for the named trial if available, or undefined
40 * otherwise. 59 * otherwise.
41 * @param {string} name 60 * @param {string} name
42 * @param {Function} callback 61 * @param {function(Object):void} callback
62 * @see https://developer.chrome.com/extensions/metricsPrivate#method-getVariati onParams
43 */ 63 */
44 chrome.metricsPrivate.getVariationParams = function(name, callback) {}; 64 chrome.metricsPrivate.getVariationParams = function(name, callback) {};
45 65
46 /** 66 /**
47 * Records an action performed by the user. 67 * Records an action performed by the user.
48 * @param {string} name 68 * @param {string} name
69 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordUser Action
49 */ 70 */
50 chrome.metricsPrivate.recordUserAction = function(name) {}; 71 chrome.metricsPrivate.recordUserAction = function(name) {};
51 72
52 /** 73 /**
53 * Records a percentage value from 1 to 100. 74 * Records a percentage value from 1 to 100.
54 * @param {string} metricName 75 * @param {string} metricName
55 * @param {number} value 76 * @param {number} value
77 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordPerc entage
56 */ 78 */
57 chrome.metricsPrivate.recordPercentage = function(metricName, value) {}; 79 chrome.metricsPrivate.recordPercentage = function(metricName, value) {};
58 80
59 /** 81 /**
60 * Records a value than can range from 1 to 1,000,000. 82 * Records a value than can range from 1 to 1,000,000.
61 * @param {string} metricName 83 * @param {string} metricName
62 * @param {number} value 84 * @param {number} value
85 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordCoun t
63 */ 86 */
64 chrome.metricsPrivate.recordCount = function(metricName, value) {}; 87 chrome.metricsPrivate.recordCount = function(metricName, value) {};
65 88
66 /** 89 /**
67 * Records a value than can range from 1 to 100. 90 * Records a value than can range from 1 to 100.
68 * @param {string} metricName 91 * @param {string} metricName
69 * @param {number} value 92 * @param {number} value
93 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordSmal lCount
70 */ 94 */
71 chrome.metricsPrivate.recordSmallCount = function(metricName, value) {}; 95 chrome.metricsPrivate.recordSmallCount = function(metricName, value) {};
72 96
73 /** 97 /**
74 * Records a value than can range from 1 to 10,000. 98 * Records a value than can range from 1 to 10,000.
75 * @param {string} metricName 99 * @param {string} metricName
76 * @param {number} value 100 * @param {number} value
101 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordMedi umCount
77 */ 102 */
78 chrome.metricsPrivate.recordMediumCount = function(metricName, value) {}; 103 chrome.metricsPrivate.recordMediumCount = function(metricName, value) {};
79 104
80 /** 105 /**
81 * Records an elapsed time of no more than 10 seconds. The sample value is 106 * Records an elapsed time of no more than 10 seconds. The sample value is
82 * specified in milliseconds. 107 * specified in milliseconds.
83 * @param {string} metricName 108 * @param {string} metricName
84 * @param {number} value 109 * @param {number} value
110 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordTime
85 */ 111 */
86 chrome.metricsPrivate.recordTime = function(metricName, value) {}; 112 chrome.metricsPrivate.recordTime = function(metricName, value) {};
87 113
88 /** 114 /**
89 * Records an elapsed time of no more than 3 minutes. The sample value is 115 * Records an elapsed time of no more than 3 minutes. The sample value is
90 * specified in milliseconds. 116 * specified in milliseconds.
91 * @param {string} metricName 117 * @param {string} metricName
92 * @param {number} value 118 * @param {number} value
119 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordMedi umTime
93 */ 120 */
94 chrome.metricsPrivate.recordMediumTime = function(metricName, value) {}; 121 chrome.metricsPrivate.recordMediumTime = function(metricName, value) {};
95 122
96 /** 123 /**
97 * Records an elapsed time of no more than 1 hour. The sample value is 124 * Records an elapsed time of no more than 1 hour. The sample value is
98 * specified in milliseconds. 125 * specified in milliseconds.
99 * @param {string} metricName 126 * @param {string} metricName
100 * @param {number} value 127 * @param {number} value
128 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordLong Time
101 */ 129 */
102 chrome.metricsPrivate.recordLongTime = function(metricName, value) {}; 130 chrome.metricsPrivate.recordLongTime = function(metricName, value) {};
103 131
104 /** 132 /**
105 * Increments the count associated with |value| in the sparse histogram defined 133 * Increments the count associated with |value| in the sparse histogram defined
106 * by the |metricName|. 134 * by the |metricName|.
107 * @param {string} metricName 135 * @param {string} metricName
108 * @param {number} value 136 * @param {number} value
137 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordSpar seValue
109 */ 138 */
110 chrome.metricsPrivate.recordSparseValue = function(metricName, value) {}; 139 chrome.metricsPrivate.recordSparseValue = function(metricName, value) {};
111 140
112 /** 141 /**
113 * Adds a value to the given metric. 142 * Adds a value to the given metric.
114 * @param {MetricType} metric 143 * @param {!chrome.metricsPrivate.MetricType} metric
115 * @param {number} value 144 * @param {number} value
145 * @see https://developer.chrome.com/extensions/metricsPrivate#method-recordValu e
116 */ 146 */
117 chrome.metricsPrivate.recordValue = function(metric, value) {}; 147 chrome.metricsPrivate.recordValue = function(metric, value) {};
OLDNEW
« no previous file with comments | « remoting/webapp/js_proto/chrome_mocks.js ('k') | ui/file_manager/file_manager/common/js/metrics_base.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698