Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / common / extensions / api / metrics_private.json
blobba8cc901228c1951e37aa5755ac61b1293c9258a
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
3 // found in the LICENSE file.
6   {
7     "namespace": "metricsPrivate",
8     "description": "none",
9     "types": [
10       {
11         "id": "MetricTypeType",
12         "type": "string",
13         "enum": ["histogram-log", "histogram-linear"],
14         "description": "The type of metric, such as 'histogram-log' or 'histogram-linear'."
15       },
16       {
17         "id": "MetricType",
18         "type":  "object",
19         "description": "Describes the type of metric that is to be collected.",
20         "properties": {
21           "metricName": {"type": "string", "description": "A unique name within the extension for the metric."},
22           "type": {
23             "$ref": "MetricTypeType"
24           },
25           "min": {"type": "integer", "description": "The minimum sample value to be recoded.  Must be greater than zero."},
26           "max": {"type": "integer", "description": "The maximum sample value to be recoded."},
27           "buckets": {"type": "integer", "description": "The number of buckets to use when separating the recorded values."}
28         }
29       }
30     ],
31     "functions": [
32       {
33         "name": "getIsCrashReportingEnabled",
34         "description": "Returns true if the user opted in to sending crash reports.",
35         "type": "function",
36         "parameters": [
37           {
38             "name": "callback",
39             "type": "function",
40             "optional": false,
41             "parameters": [
42               { "name": "is_enabled", "type": "boolean" }
43             ]
44           }
45         ]
46       },
47       {
48         "name": "getFieldTrial",
49         "description": "Returns the group name chosen for the named trial, or the empty string if the trial does not exist or is not enabled.",
50         "type": "function",
51         "parameters": [
52           {"name": "name", "type": "string"},
53           {
54             "name": "callback",
55             "type": "function",
56             "optional": false,
57             "parameters": [
58               { "name": "group", "type": "string" }
59             ]
60           }
61         ]
62       },
63       {
64         "name": "getVariationParams",
65         "description": "Returns variation parameters for the named trial if available, or undefined otherwise.",
66         "type": "function",
67         "parameters": [
68           {"name": "name", "type": "string"},
69           {
70             "name": "callback",
71             "type": "function",
72             "optional": false,
73             "parameters": [
74               {
75                 "name": "params",
76                 "optional": true,
77                 "type": "object",
78                 "additionalProperties": { "type": "string" }
79               }
80             ]
81           }
82         ]
83       },
84       {
85         "name": "recordUserAction",
86         "type": "function",
87         "description": "Records an action performed by the user.",
88         "parameters": [
89           {"name": "name", "type": "string"}
90         ]
91       },
92       {
93         "name": "recordPercentage",
94         "type": "function",
95         "description": "Records a percentage value from 1 to 100.",
96         "parameters": [
97           {"name": "metricName", "type": "string"},
98           {"name": "value", "type": "integer"}
99         ]
100       },
101       {
102         "name": "recordCount",
103         "type": "function",
104         "description": "Records a value than can range from 1 to 1,000,000.",
105         "parameters": [
106           {"name": "metricName", "type": "string"},
107           {"name": "value", "type": "integer"}
108         ]
109       },
110       {
111         "name": "recordSmallCount",
112         "type": "function",
113         "description": "Records a value than can range from 1 to 100.",
114         "parameters": [
115           {"name": "metricName", "type": "string"},
116           {"name": "value", "type": "integer"}
117         ]
118       },
119       {
120         "name": "recordMediumCount",
121         "type": "function",
122         "description": "Records a value than can range from 1 to 10,000.",
123         "parameters": [
124           {"name": "metricName", "type": "string"},
125           {"name": "value", "type": "integer"}
126         ]
127       },
128       {
129         "name": "recordTime",
130         "type": "function",
131         "description": "Records an elapsed time of no more than 10 seconds.  The sample value is specified in milliseconds.",
132         "parameters": [
133           {"name": "metricName", "type": "string"},
134           {"name": "value", "type": "integer"}
135         ]
136       },
137       {
138         "name": "recordMediumTime",
139         "type": "function",
140         "description": "Records an elapsed time of no more than 3 minutes.  The sample value is specified in milliseconds.",
141         "parameters": [
142           {"name": "metricName", "type": "string"},
143           {"name": "value", "type": "integer"}
144         ]
145       },
146       {
147         "name": "recordLongTime",
148         "type": "function",
149         "description": "Records an elapsed time of no more than 1 hour.  The sample value is specified in milliseconds.",
150         "parameters": [
151           {"name": "metricName", "type": "string"},
152           {"name": "value", "type": "integer"}
153         ]
154       },
155       {
156         "name": "recordSparseValue",
157         "type": "function",
158         "description": "Increments the count associated with |value| in the sparse histogram defined by the |metricName|.",
159         "parameters": [
160           {"name": "metricName", "type": "string"},
161           {"name": "value", "type": "integer"}
162         ]
163       },
164       {
165         "name": "recordValue",
166         "type": "function",
167         "description": "Adds a value to the given metric.",
168         "parameters": [
169           {"name": "metric", "$ref": "MetricType"},
170           {"name": "value", "type": "integer"}
171         ]
172       }
173     ],
174     "events": []
175   }