OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Utility methods for accessing chrome.metricsPrivate API. | 6 * @fileoverview Utility methods for accessing chrome.metricsPrivate API. |
7 * | 7 * |
8 * To be included as a first script in main.html | 8 * To be included as a first script in main.html |
9 */ | 9 */ |
10 | 10 |
| 11 /** |
| 12 * @extends {metricsBase} |
| 13 */ |
11 var metrics = metricsBase; | 14 var metrics = metricsBase; |
12 | 15 |
13 metrics.startInterval('Load.Total'); | 16 /** |
14 metrics.startInterval('Load.Script'); | 17 * Values for "VideoPlayer.CastExtensionStaus" metrics. |
| 18 * @enum {number} |
| 19 */ |
| 20 metrics.CAST_EXTENSION = { |
| 21 EXTENSION_UNAVAILABLE: 0, |
| 22 API_INSTALLATION_FAILED: 1, |
| 23 API_LOAD_FAILED: 2, |
| 24 API_INSTALLED_AND_LOADED: 3, |
| 25 API_AVAILABLE_AND_LOADED: 4, |
| 26 MAX_VALUE: 4 |
| 27 }; |
15 | 28 |
16 /** | 29 /** |
17 * Convert a short metric name to the full format. | 30 * Convert a short metric name to the full format. |
18 * | 31 * |
19 * @param {string} name Short metric name. | 32 * @param {string} name Short metric name. |
20 * @return {string} Full metric name. | 33 * @return {string} Full metric name. |
21 * @override | 34 * @override |
22 * @private | 35 * @private |
23 */ | 36 */ |
24 metrics.convertName_ = function(name) { | 37 metrics.convertName_ = function(name) { |
25 return 'FileBrowser.' + name; | 38 return 'VideoPlayer.' + name; |
26 }; | 39 }; |
OLD | NEW |