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

Side by Side Diff: components/sync/tools/testserver/xmppserver.py

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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
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'
OLDNEW
« no previous file with comments | « components/sync/tools/testserver/sync_testserver.py ('k') | components/sync/tools/testserver/xmppserver_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698