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.
5 cr.define('hotword.metrics', function() {
9 * Helper function to record enum values in UMA.
10 * @param {!string} name
11 * @param {!number} value
12 * @param {!number} maxValue
14 function recordEnum(name, value, maxValue) {
17 'type': 'histogram-linear',
20 'buckets': maxValue + 1
22 chrome.metricsPrivate.recordValue(metricDesc, value);
26 recordEnum: recordEnum