Index: sync/notifier/p2p_notifier.cc |
diff --git a/sync/notifier/p2p_notifier.cc b/sync/notifier/p2p_notifier.cc |
index c4fcfbe649eab9dd939630969d76165031d42984..bb16f5e21d97ea1c787d4909d6b50266a3f29c4e 100644 |
--- a/sync/notifier/p2p_notifier.cc |
+++ b/sync/notifier/p2p_notifier.cc |
@@ -281,6 +281,11 @@ void P2PNotifier::SendNotificationDataForTest( |
void P2PNotifier::SendNotificationData( |
const P2PNotificationData& notification_data) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
+ if (notification_data.GetChangedTypes().Empty()) { |
+ DVLOG(1) << "Not sending XMPP notification with no changed types: " |
+ << notification_data.ToString(); |
+ return; |
+ } |
notifier::Notification notification; |
notification.channel = kSyncP2PNotificationChannel; |
notification.data = notification_data.ToString(); |