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

Side by Side Diff: chrome/browser/resources/hotword/metrics.js

Issue 667873002: Add UMA to hotword trigger extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove invalid user action. Created 6 years, 2 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
(Empty)
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.
4
5 cr.define('hotword.metrics', function() {
6 'use strict';
7
8 /**
9 * Helper function to record enum values in UMA.
10 * @param {!string} name
11 * @param {!number} value
12 * @param {!number} max_value
13 */
14 function recordEnum(name, value, max_value) {
Dan Beam 2014/10/21 01:57:29 maxValue
Anand Mistry (off Chromium) 2014/10/21 05:26:41 Done.
15 var metricDesc = {
16 'metricName': name,
17 'type': 'histogram-linear',
18 'min': 1,
19 'max': max_value,
20 'buckets': max_value + 1
21 };
22 chrome.metricsPrivate.recordValue(metricDesc, value);
23 }
24
25 return {
26 recordEnum: recordEnum
27 };
28 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/hotword/manifest.json ('k') | chrome/browser/resources/hotword/nacl_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698