Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / resources / hotword / metrics.js
blob6adccb4a234f10a17a9418c72cc3fb5870d6b4e0
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() {
6 'use strict';
8 /**
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) {
15 var metricDesc = {
16 'metricName': name,
17 'type': 'histogram-linear',
18 'min': 1,
19 'max': maxValue,
20 'buckets': maxValue + 1
22 chrome.metricsPrivate.recordValue(metricDesc, value);
25 return {
26 recordEnum: recordEnum
28 });