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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "extension", 3 "namespace": "extension",
4 "unprivileged": true, 4 "unprivileged": true,
5 "types": [ 5 "types": [
6 { 6 {
7 "id": "MessageSender", 7 "id": "MessageSender",
8 "type": "object", 8 "type": "object",
9 "description": "An object containing information about the script contex t that sent a message or request.", 9 "description": "An object containing information about the script contex t that sent a message or request.",
10 "properties": { 10 "properties": {
(...skipping 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 "description": "Details about the tab's process." 2249 "description": "Details about the tab's process."
2250 } 2250 }
2251 ] 2251 ]
2252 } 2252 }
2253 ] 2253 ]
2254 } 2254 }
2255 ], 2255 ],
2256 "events": [] 2256 "events": []
2257 }, 2257 },
2258 { 2258 {
2259 "namespace": "metrics",
2260 "types": [
2261 {
2262 "id": "MetricType",
2263 "type": "object",
2264 "description": "Describes the type of metric that is to be collected.",
2265 "properties": {
2266 "metricName": {"type": "string", "description": "A unique name within the extension for the metric."},
2267 "type": {
2268 "type": "string",
2269 "enum": ["histogram-log", "histogram-linear"],
2270 "description": "The type of metric, such as 'histogram-log' or 'hist ogram-linear'."
2271 },
2272 "min": {"type": "integer", "description": "The minimum sample value to be recoded. Must be greater than zero."},
2273 "max": {"type": "integer", "description": "The maximum sample value to be recoded."},
2274 "buckets": {"type": "integer", "description": "The number of buckets t o use when separating the recorded values."}
2275 }
2276 }
2277 ],
2278 "functions": [
2279 {
2280 "name": "recordUserAction",
2281 "type": "function",
2282 "description": "Records an action performed by the user.",
2283 "parameters": [
2284 {"name": "name", "type": "string"}
2285 ]
2286 },
2287 {
2288 "name": "recordPercentage",
2289 "type": "function",
2290 "description": "Record a percentage value from 1 to 100.",
2291 "parameters": [
2292 {"name": "metricName", "type": "string"},
2293 {"name": "value", "type": "integer"}
2294 ]
2295 },
2296 {
2297 "name": "recordCount",
2298 "type": "function",
2299 "description": "Record a value than can range from 1 to 1,000,000.",
2300 "parameters": [
2301 {"name": "metricName", "type": "string"},
2302 {"name": "value", "type": "integer"}
2303 ]
2304 },
2305 {
2306 "name": "recordSmallCount",
2307 "type": "function",
2308 "description": "Record a value than can range from 1 to 100.",
2309 "parameters": [
2310 {"name": "metricName", "type": "string"},
2311 {"name": "value", "type": "integer"}
2312 ]
2313 },
2314 {
2315 "name": "recordMediumCount",
2316 "type": "function",
2317 "description": "Record a value than can range from 1 to 10,000.",
2318 "parameters": [
2319 {"name": "metricName", "type": "string"},
2320 {"name": "value", "type": "integer"}
2321 ]
2322 },
2323 {
2324 "name": "recordTime",
2325 "type": "function",
2326 "description": "Record an elapsed time of no more than 10 seconds. The sample value is specified in milliseconds.",
2327 "parameters": [
2328 {"name": "metricName", "type": "string"},
2329 {"name": "value", "type": "integer"}
2330 ]
2331 },
2332 {
2333 "name": "recordMediumTime",
2334 "type": "function",
2335 "description": "Record an elapsed time of no more than 3 minutes. The s ample value is specified in milliseconds.",
2336 "parameters": [
2337 {"name": "metricName", "type": "string"},
2338 {"name": "value", "type": "integer"}
2339 ]
2340 },
2341 {
2342 "name": "recordLongTime",
2343 "type": "function",
2344 "description": "Record an elapsed time of no more than 1 hour. The samp le value is specified in milliseconds.",
2345 "parameters": [
2346 {"name": "metricName", "type": "string"},
2347 {"name": "value", "type": "integer"}
2348 ]
2349 },
2350 {
2351 "name": "recordValue",
2352 "type": "function",
2353 "unprivileged": true,
2354 "description": "Adds a value to the given metric.",
2355 "parameters": [
2356 {"name": "metric", "$ref": "MetricType"},
2357 {"name": "value", "type": "integer"}
2358 ]
2359 }
2360 ],
2361 "events": []
2362 },
2363 {
2259 "namespace": "test", 2364 "namespace": "test",
2260 "nodoc": true, 2365 "nodoc": true,
2261 "types": [], 2366 "types": [],
2262 "functions": [ 2367 "functions": [
2263 { 2368 {
2264 "name": "notifyFail", 2369 "name": "notifyFail",
2265 "type": "function", 2370 "type": "function",
2266 "description": "Notify the browser process that test code running in the extension failed. This is only used for internal unit testing.", 2371 "description": "Notify the browser process that test code running in the extension failed. This is only used for internal unit testing.",
2267 "parameters": [ 2372 "parameters": [
2268 {"type": "string", "name": "message"} 2373 {"type": "string", "name": "message"}
(...skipping 26 matching lines...) Expand all
2295 "type": "function", 2400 "type": "function",
2296 "description": "Creates an incognito tab during internal testing. Succee ds even if the extension is not enabled in incognito mode.", 2401 "description": "Creates an incognito tab during internal testing. Succee ds even if the extension is not enabled in incognito mode.",
2297 "parameters": [ 2402 "parameters": [
2298 {"type": "string", "name": "url"} 2403 {"type": "string", "name": "url"}
2299 ] 2404 ]
2300 } 2405 }
2301 ], 2406 ],
2302 "events": [] 2407 "events": []
2303 } 2408 }
2304 ] 2409 ]
OLDNEW
« 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