Index: chrome/browser/resources/hotword/logging.js |
diff --git a/chrome/browser/resources/hotword/logging.js b/chrome/browser/resources/hotword/logging.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4f69b46c518b8d09927b1258aa33f5a9e1297ed2 |
--- /dev/null |
+++ b/chrome/browser/resources/hotword/logging.js |
@@ -0,0 +1,23 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+cr.define('hotword', function() { |
+ 'use strict'; |
+ |
+ var DEBUG = false; |
Dan Beam
2014/09/30 03:42:58
nit: just remove this
Anand Mistry (off Chromium)
2014/09/30 04:14:03
Done.
|
+ |
+ /** |
+ * Wrapper around console.log allowing debug log message to be enabled during |
+ * development. |
+ */ |
+ function debug() { |
+ if (hotword.DEBUG || window.localStorage['hotword.DEBUG']) |
+ console.log.apply(console, arguments); |
+ } |
+ |
+ return { |
+ DEBUG: DEBUG, |
Dan Beam
2014/09/30 03:42:58
DEBUG: false,
Anand Mistry (off Chromium)
2014/09/30 04:14:03
Done.
|
+ debug: debug |
+ }; |
+}); |