OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "jingle/notifier/listener/push_notifications_send_update_task.h" | 5 #include "jingle/notifier/listener/push_notifications_send_update_task.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/base64.h" | 12 #include "base/base64.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "jingle/notifier/listener/notification_constants.h" | 14 #include "jingle/notifier/listener/notification_constants.h" |
15 #include "jingle/notifier/listener/xml_element_util.h" | 15 #include "jingle/notifier/listener/xml_element_util.h" |
16 #include "third_party/webrtc/libjingle/xmllite/qname.h" | 16 #include "third_party/libjingle_xmpp/xmllite/qname.h" |
17 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 17 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
18 #include "webrtc/libjingle/xmpp/constants.h" | 18 #include "third_party/libjingle_xmpp/xmpp/constants.h" |
19 #include "webrtc/libjingle/xmpp/jid.h" | 19 #include "third_party/libjingle_xmpp/xmpp/jid.h" |
20 #include "webrtc/libjingle/xmpp/xmppclient.h" | 20 #include "third_party/libjingle_xmpp/xmpp/xmppclient.h" |
21 | 21 |
22 namespace notifier { | 22 namespace notifier { |
23 | 23 |
24 PushNotificationsSendUpdateTask::PushNotificationsSendUpdateTask( | 24 PushNotificationsSendUpdateTask::PushNotificationsSendUpdateTask( |
25 buzz::XmppTaskParentInterface* parent, const Notification& notification) | 25 buzz::XmppTaskParentInterface* parent, const Notification& notification) |
26 : XmppTask(parent), notification_(notification) {} | 26 : XmppTask(parent), notification_(notification) {} |
27 | 27 |
28 PushNotificationsSendUpdateTask::~PushNotificationsSendUpdateTask() {} | 28 PushNotificationsSendUpdateTask::~PushNotificationsSendUpdateTask() {} |
29 | 29 |
30 int PushNotificationsSendUpdateTask::ProcessStart() { | 30 int PushNotificationsSendUpdateTask::ProcessStart() { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 buzz::XmlElement* data = new buzz::XmlElement(kQnData, true); | 80 buzz::XmlElement* data = new buzz::XmlElement(kQnData, true); |
81 std::string base64_data; | 81 std::string base64_data; |
82 base::Base64Encode(notification.data, &base64_data); | 82 base::Base64Encode(notification.data, &base64_data); |
83 data->SetBodyText(base64_data); | 83 data->SetBodyText(base64_data); |
84 push->AddElement(data); | 84 push->AddElement(data); |
85 | 85 |
86 return message; | 86 return message; |
87 } | 87 } |
88 | 88 |
89 } // namespace notifier | 89 } // namespace notifier |
OLD | NEW |