OLD | NEW |
---|---|
(Empty) | |
1 <!-- | |
2 Copyright 2014 The Chromium Authors. All rights reserved. | |
3 Use of this source code is governed by a BSD-style license that can be | |
4 found in the LICENSE file. | |
5 --> | |
6 | |
7 <script> | |
8 function CTFailureGroup(key, failures, snoozeTime) { | |
9 this.key = key; | |
10 this.failures = failures; | |
11 this.snoozeTime = snoozeTime; | |
12 } | |
13 | |
14 | |
ojan
2014/08/06 04:03:01
Just one line break
dstockwell
2014/08/06 06:55:12
Done.
| |
15 CTFailureGroup.prototype = { | |
ojan
2014/08/06 04:03:01
For better or worse, we've been using the style wh
dstockwell
2014/08/06 06:55:12
Done.
| |
16 get isSnoozed() { | |
ojan
2014/08/06 04:03:01
IMO getters make for confusing code. More importan
dstockwell
2014/08/06 06:55:13
Done.
| |
17 return Date.now() < this.snoozeTime; | |
18 }, | |
19 snoozeUntil: function(time) { | |
20 // FIXME: Post snooze message to frontend. | |
21 this.snoozeTime = time; | |
ojan
2014/08/06 04:03:01
I think it makes sense to implement this increment
dstockwell
2014/08/06 06:55:13
Done.
| |
22 Object.getNotifier(this).notify({ | |
ojan
2014/08/06 04:03:01
Why did you need to do this? This might be working
dstockwell
2014/08/06 06:55:13
Yes, this allows the binding to the getter to be r
| |
23 type: 'updated', | |
24 name: 'isSnoozed', | |
25 }); | |
26 } | |
27 }; | |
28 </script> | |
OLD | NEW |