| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 """A bare-bones and non-compliant XMPP server. | 5 """A bare-bones and non-compliant XMPP server. |
| 6 | 6 |
| 7 Just enough of the protocol is implemented to get it to work with | 7 Just enough of the protocol is implemented to get it to work with |
| 8 Chrome's sync notification system. | 8 Chrome's sync notification system. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 self._connections.discard(xmpp_connection) | 594 self._connections.discard(xmpp_connection) |
| 595 self._handshake_done_connections.discard(xmpp_connection) | 595 self._handshake_done_connections.discard(xmpp_connection) |
| 596 | 596 |
| 597 def ForwardNotification(self, unused_xmpp_connection, notification_stanza): | 597 def ForwardNotification(self, unused_xmpp_connection, notification_stanza): |
| 598 if self._notifications_enabled: | 598 if self._notifications_enabled: |
| 599 for connection in self._handshake_done_connections: | 599 for connection in self._handshake_done_connections: |
| 600 print 'Sending notification to %s' % connection | 600 print 'Sending notification to %s' % connection |
| 601 connection.ForwardNotification(notification_stanza) | 601 connection.ForwardNotification(notification_stanza) |
| 602 else: | 602 else: |
| 603 print 'Notifications disabled; dropping notification' | 603 print 'Notifications disabled; dropping notification' |
| OLD | NEW |