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

Unified Diff: chrome/common/extensions/api/extension_api.json

Issue 657037: Add a metrics extensions API.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/renderer/resources/renderer_extension_bindings.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_api.json
===================================================================
--- chrome/common/extensions/api/extension_api.json (revision 40111)
+++ chrome/common/extensions/api/extension_api.json (working copy)
@@ -2256,6 +2256,111 @@
"events": []
},
{
+ "namespace": "metrics",
+ "types": [
+ {
+ "id": "MetricType",
+ "type": "object",
+ "description": "Describes the type of metric that is to be collected.",
+ "properties": {
+ "metricName": {"type": "string", "description": "A unique name within the extension for the metric."},
+ "type": {
+ "type": "string",
+ "enum": ["histogram-log", "histogram-linear"],
+ "description": "The type of metric, such as 'histogram-log' or 'histogram-linear'."
+ },
+ "min": {"type": "integer", "description": "The minimum sample value to be recoded. Must be greater than zero."},
+ "max": {"type": "integer", "description": "The maximum sample value to be recoded."},
+ "buckets": {"type": "integer", "description": "The number of buckets to use when separating the recorded values."}
+ }
+ }
+ ],
+ "functions": [
+ {
+ "name": "recordUserAction",
+ "type": "function",
+ "description": "Records an action performed by the user.",
+ "parameters": [
+ {"name": "name", "type": "string"}
+ ]
+ },
+ {
+ "name": "recordPercentage",
+ "type": "function",
+ "description": "Record a percentage value from 1 to 100.",
+ "parameters": [
+ {"name": "metricName", "type": "string"},
+ {"name": "value", "type": "integer"}
+ ]
+ },
+ {
+ "name": "recordCount",
+ "type": "function",
+ "description": "Record a value than can range from 1 to 1,000,000.",
+ "parameters": [
+ {"name": "metricName", "type": "string"},
+ {"name": "value", "type": "integer"}
+ ]
+ },
+ {
+ "name": "recordSmallCount",
+ "type": "function",
+ "description": "Record a value than can range from 1 to 100.",
+ "parameters": [
+ {"name": "metricName", "type": "string"},
+ {"name": "value", "type": "integer"}
+ ]
+ },
+ {
+ "name": "recordMediumCount",
+ "type": "function",
+ "description": "Record a value than can range from 1 to 10,000.",
+ "parameters": [
+ {"name": "metricName", "type": "string"},
+ {"name": "value", "type": "integer"}
+ ]
+ },
+ {
+ "name": "recordTime",
+ "type": "function",
+ "description": "Record an elapsed time of no more than 10 seconds. The sample value is specified in milliseconds.",
+ "parameters": [
+ {"name": "metricName", "type": "string"},
+ {"name": "value", "type": "integer"}
+ ]
+ },
+ {
+ "name": "recordMediumTime",
+ "type": "function",
+ "description": "Record an elapsed time of no more than 3 minutes. The sample value is specified in milliseconds.",
+ "parameters": [
+ {"name": "metricName", "type": "string"},
+ {"name": "value", "type": "integer"}
+ ]
+ },
+ {
+ "name": "recordLongTime",
+ "type": "function",
+ "description": "Record an elapsed time of no more than 1 hour. The sample value is specified in milliseconds.",
+ "parameters": [
+ {"name": "metricName", "type": "string"},
+ {"name": "value", "type": "integer"}
+ ]
+ },
+ {
+ "name": "recordValue",
+ "type": "function",
+ "unprivileged": true,
+ "description": "Adds a value to the given metric.",
+ "parameters": [
+ {"name": "metric", "$ref": "MetricType"},
+ {"name": "value", "type": "integer"}
+ ]
+ }
+ ],
+ "events": []
+ },
+ {
"namespace": "test",
"nodoc": true,
"types": [],
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/renderer/resources/renderer_extension_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698