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

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

Issue 667873002: Add UMA to hotword trigger extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove incorrect log for message timeout. 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 cr.define('hotword.constants', function() { 5 cr.define('hotword.constants', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Hotword data shared module extension's ID. 9 * Hotword data shared module extension's ID.
10 * @const {string} 10 * @const {string}
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 * Source of a hotwording session request. 118 * Source of a hotwording session request.
119 * @enum {string} 119 * @enum {string}
120 */ 120 */
121 var SessionSource = { 121 var SessionSource = {
122 LAUNCHER: 'launcher', 122 LAUNCHER: 'launcher',
123 NTP: 'ntp', 123 NTP: 'ntp',
124 ALWAYS: 'always' 124 ALWAYS: 'always'
125 }; 125 };
126 126
127 /** 127 /**
128 * MediaStream open success/errors to be reported via UMA.
129 * DO NOT remove or renumber values in this enum. Only add new ones.
130 * @enum {number}
131 */
132 var UmaMediaStreamOpenResult = {
133 SUCCESS: 0,
134 UNKNOWN: 1,
135 NOT_SUPPORTED: 2,
136 PERMISSION_DENIED: 3,
137 CONSTRAINT_NOT_SATISFIED: 4,
138 OVERCONSTRAINED: 5,
139 NOT_FOUND: 6,
140 ABORT: 7,
141 SOURCE_UNAVAILABLE: 8,
142 PERMISSION_DISMISSED: 9,
143 INVALID_STATE: 10,
144 DEVICES_NOT_FOUND: 11,
145 INVALID_SECURITY_ORIGIN: 12,
146 MAX: 12
147 };
148
149 /**
150 * UMA metrics.
151 * DO NOT change these enum values.
152 * @enum {string}
153 */
154 var UmaMetrics = {
155 TRIGGER: 'Hotword.HotwordTrigger',
156 MEDIA_STREAM_RESULT: 'Hotword.HotwordMediaStreamResult',
157 NACL_PLUGIN_LOAD_RESULT: 'Hotword.HotwordNaClPluginLoadResult',
158 NACL_MESSAGE_TIMEOUT: 'Hotword.HotwordNaClMessageTimeout'
159 };
160
161 /**
162 * Message waited for by NaCl plugin, to be reported via UMA.
163 * DO NOT remove or renumber values in this enum. Only add new ones.
164 * @enum {number}
165 */
166 var UmaNaClMessageTimeout = {
167 REQUEST_MODEL: 0,
168 MODEL_LOADED: 1,
169 READY_FOR_AUDIO: 2,
170 STOPPED: 3,
171 HOTWORD_DETECTED: 4,
172 MS_CONFIGURED: 5,
173 MAX: 5
174 };
175
176 /**
177 * NaCl plugin load success/errors to be reported via UMA.
178 * DO NOT remove or renumber values in this enum. Only add new ones.
179 * @enum {number}
180 */
181 var UmaNaClPluginLoadResult = {
182 SUCCESS: 0,
183 UNKNOWN: 1,
184 CRASH: 2,
185 NO_MODULE_FOUND: 3,
186 MAX: 3
187 };
188
189 /**
128 * The browser UI language. 190 * The browser UI language.
129 * @const {string} 191 * @const {string}
130 */ 192 */
131 var UI_LANGUAGE = (chrome.i18n && chrome.i18n.getUILanguage) ? 193 var UI_LANGUAGE = (chrome.i18n && chrome.i18n.getUILanguage) ?
132 chrome.i18n.getUILanguage() : ''; 194 chrome.i18n.getUILanguage() : '';
133 195
134 return { 196 return {
135 CLIENT_PORT_NAME: CLIENT_PORT_NAME, 197 CLIENT_PORT_NAME: CLIENT_PORT_NAME,
136 COMMAND_FIELD_NAME: COMMAND_FIELD_NAME, 198 COMMAND_FIELD_NAME: COMMAND_FIELD_NAME,
137 SHARED_MODULE_ID: SHARED_MODULE_ID, 199 SHARED_MODULE_ID: SHARED_MODULE_ID,
138 SHARED_MODULE_ROOT: SHARED_MODULE_ROOT, 200 SHARED_MODULE_ROOT: SHARED_MODULE_ROOT,
139 UI_LANGUAGE: UI_LANGUAGE, 201 UI_LANGUAGE: UI_LANGUAGE,
140 CommandToPage: CommandToPage, 202 CommandToPage: CommandToPage,
141 CommandFromPage: CommandFromPage, 203 CommandFromPage: CommandFromPage,
142 Error: Error, 204 Error: Error,
143 Event: Event, 205 Event: Event,
144 File: File, 206 File: File,
145 NaClPlugin: NaClPlugin, 207 NaClPlugin: NaClPlugin,
146 SessionSource: SessionSource, 208 SessionSource: SessionSource,
147 TimeoutMs: TimeoutMs 209 TimeoutMs: TimeoutMs,
210 UmaMediaStreamOpenResult: UmaMediaStreamOpenResult,
211 UmaMetrics: UmaMetrics,
212 UmaNaClMessageTimeout: UmaNaClMessageTimeout,
213 UmaNaClPluginLoadResult: UmaNaClPluginLoadResult
148 }; 214 };
149 215
150 }); 216 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/component_extension_resources.grd ('k') | chrome/browser/resources/hotword/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698