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_subscribe_task.h" | 5 #include "jingle/notifier/listener/push_notifications_subscribe_task.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "jingle/notifier/listener/notification_constants.h" | 11 #include "jingle/notifier/listener/notification_constants.h" |
12 #include "jingle/notifier/listener/xml_element_util.h" | 12 #include "jingle/notifier/listener/xml_element_util.h" |
13 #include "talk/base/task.h" | |
14 #include "talk/xmllite/qname.h" | 13 #include "talk/xmllite/qname.h" |
15 #include "talk/xmllite/xmlelement.h" | 14 #include "talk/xmllite/xmlelement.h" |
| 15 #include "talk/xmpp/constants.h" |
16 #include "talk/xmpp/xmppclient.h" | 16 #include "talk/xmpp/xmppclient.h" |
17 #include "talk/xmpp/constants.h" | |
18 #include "talk/xmpp/xmppengine.h" | 17 #include "talk/xmpp/xmppengine.h" |
| 18 #include "webrtc/base/task.h" |
19 | 19 |
20 namespace notifier { | 20 namespace notifier { |
21 | 21 |
22 PushNotificationsSubscribeTask::PushNotificationsSubscribeTask( | 22 PushNotificationsSubscribeTask::PushNotificationsSubscribeTask( |
23 buzz::XmppTaskParentInterface* parent, | 23 buzz::XmppTaskParentInterface* parent, |
24 const SubscriptionList& subscriptions, | 24 const SubscriptionList& subscriptions, |
25 Delegate* delegate) | 25 Delegate* delegate) |
26 : XmppTask(parent, buzz::XmppEngine::HL_SINGLE), | 26 : XmppTask(parent, buzz::XmppEngine::HL_SINGLE), |
27 subscriptions_(subscriptions), delegate_(delegate) { | 27 subscriptions_(subscriptions), delegate_(delegate) { |
28 } | 28 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 buzz::QName(kPushNotificationsNamespace, "item")); | 100 buzz::QName(kPushNotificationsNamespace, "item")); |
101 item->AddAttr(buzz::QName(buzz::STR_EMPTY, "channel"), | 101 item->AddAttr(buzz::QName(buzz::STR_EMPTY, "channel"), |
102 iter->channel.c_str()); | 102 iter->channel.c_str()); |
103 item->AddAttr(buzz::QN_FROM, iter->from.c_str()); | 103 item->AddAttr(buzz::QN_FROM, iter->from.c_str()); |
104 subscribe->AddElement(item); | 104 subscribe->AddElement(item); |
105 } | 105 } |
106 return iq; | 106 return iq; |
107 } | 107 } |
108 | 108 |
109 } // namespace notifier | 109 } // namespace notifier |
OLD | NEW |