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

Unified Diff: jingle/notifier/listener/push_notifications_send_update_task.cc

Issue 7745040: [Sync] Make P2PNotifier behave more like InvalidationNotifier (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix copyright Created 9 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 side-by-side diff with in-line comments
Download patch
Index: jingle/notifier/listener/push_notifications_send_update_task.cc
diff --git a/jingle/notifier/listener/push_notifications_send_update_task.cc b/jingle/notifier/listener/push_notifications_send_update_task.cc
index 3e05a31a1445861cf08d2dd602b2b853ad49ef48..5cef1b5653c8011d54f4d8834706149554338fec 100644
--- a/jingle/notifier/listener/push_notifications_send_update_task.cc
+++ b/jingle/notifier/listener/push_notifications_send_update_task.cc
@@ -29,9 +29,10 @@ int PushNotificationsSendUpdateTask::ProcessStart() {
scoped_ptr<buzz::XmlElement> stanza(
MakeUpdateMessage(notification_,
GetClient()->jid().BareJid()));
- VLOG(1) << "P2P: Sending notification: " << XmlElementToString(*stanza);
+ VLOG(1) << "Sending notification " << notification_.ToString()
+ << " as stanza " << XmlElementToString(*stanza);
if (SendStanza(stanza.get()) != buzz::XMPP_RETURN_OK) {
- LOG(WARNING) << "Could not send: " << XmlElementToString(*stanza);
+ LOG(WARNING) << "Could not send stanza " << XmlElementToString(*stanza);
}
return STATE_DONE;
}
@@ -42,10 +43,10 @@ buzz::XmlElement* PushNotificationsSendUpdateTask::MakeUpdateMessage(
DCHECK(to_jid_bare.IsBare());
const buzz::QName kQnPush(kPushNotificationsNamespace, "push");
const buzz::QName kQnChannel(buzz::STR_EMPTY, "channel");
- const buzz::QName kQnData(buzz::STR_EMPTY, "data");
+ const buzz::QName kQnData(kPushNotificationsNamespace, "data");
// Create our update stanza. The message is constructed as:
- // <message from='{fullJid}' to='{bareJid}' type='headline'>
+ // <message from='{full jid}' to='{bare jid}' type='headline'>
// <push xmlns='google:push' channel='{channel}'>
// <data>{base-64 encoded data}</data>
// </push>
@@ -62,7 +63,7 @@ buzz::XmlElement* PushNotificationsSendUpdateTask::MakeUpdateMessage(
buzz::XmlElement* data = new buzz::XmlElement(kQnData, true);
std::string base64_data;
if (!base::Base64Encode(notification.data, &base64_data)) {
- LOG(WARNING) << "Could not encode data: " << notification.data;
+ LOG(WARNING) << "Could not encode data " << notification.data;
}
data->SetBodyText(base64_data);
push->AddElement(data);

Powered by Google App Engine
This is Rietveld 408576698