OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
Dan Beam
2014/09/29 23:45:45
s/ (c)//
Anand Mistry (off Chromium)
2014/09/30 03:41:09
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 cr.define('hotword', function() { | |
6 'use strict'; | |
7 | |
8 var DEBUG = false; | |
Dan Beam
2014/09/29 23:45:44
why not some externally visible member (e.g. hotwo
Anand Mistry (off Chromium)
2014/09/30 03:41:10
Done.
| |
9 | |
10 /** | |
11 * Wrapper around console.log allowing debug log message to be enabled during | |
12 * development. | |
13 */ | |
14 function Debug() { | |
15 if (DEBUG) { | |
Dan Beam
2014/09/29 23:45:45
nit: chrome-code generally doesn't use {} for 1-li
Anand Mistry (off Chromium)
2014/09/30 03:41:09
Oops. That one slipped by.
| |
16 console.log.apply(console, arguments); | |
17 } | |
Dan Beam
2014/09/29 23:45:44
nit: if you already need to change the code locall
Anand Mistry (off Chromium)
2014/09/30 03:41:09
I like the idea to expose DEBUG so I can enable it
| |
18 } | |
19 | |
20 return { | |
21 Debug: Debug | |
Dan Beam
2014/09/29 23:45:44
Debug => debug
Anand Mistry (off Chromium)
2014/09/30 03:41:10
Done.
| |
22 }; | |
23 }); | |
OLD | NEW |