Commit 177bcf2f authored by akalin@chromium.org's avatar akalin@chromium.org

[Sync] Don't send notifications with no changed types

They would get dropped by the recipients anyway.

BUG=138893
TEST=


Review URL: https://chromiumcodereview.appspot.com/10830023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148503 0039d316-1c4b-4281-b951-d872f2087c98
parent 721e176b
......@@ -271,6 +271,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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment