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

Unified Diff: chrome/browser/resources/hotword/manager.js

Issue 601123002: Add a trivial logging wrapper around console.log, and add some useful log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/hotword/manager.js
diff --git a/chrome/browser/resources/hotword/manager.js b/chrome/browser/resources/hotword/manager.js
index dfe4c7ef860388f86c02b934f2a01e6a28ff7ff0..0fc364b428fc63630828edd15d145da83c08b4a8 100644
--- a/chrome/browser/resources/hotword/manager.js
+++ b/chrome/browser/resources/hotword/manager.js
@@ -33,12 +33,15 @@
// Detect when the shared module containing the NaCL module and language model
// is installed.
chrome.management.onInstalled.addListener(function(info) {
- if (info.id == hotword.constants.SHARED_MODULE_ID)
+ if (info.id == hotword.constants.SHARED_MODULE_ID) {
+ hotword.debug('Shared module installed, reloading extension.');
chrome.runtime.reload();
+ }
});
// Detect when a session has requested to be started and stopped.
chrome.hotwordPrivate.onHotwordSessionRequested.addListener(function() {
+ hotword.debug('hotwordPrivate.onHotwordSessionRequested');
// TODO(amistry): This event should change state depending on whether the
// user has enabled always-on hotwording. But for now, always signal the
// start of a hotwording session. This allows this extension to work with
@@ -51,6 +54,7 @@
});
chrome.hotwordPrivate.onHotwordSessionStopped.addListener(function() {
+ hotword.debug('hotwordPrivate.onHotwordSessionStopped');
stateManager.stopSession(hotword.constants.SessionSource.LAUNCHER);
chrome.hotwordPrivate.setHotwordSessionState(false, function() {});
});

Powered by Google App Engine
This is Rietveld 408576698