OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "remoting/signaling/log_to_server.h" | 5 #include "remoting/signaling/log_to_server.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
8 #include "remoting/signaling/iq_sender.h" | 10 #include "remoting/signaling/iq_sender.h" |
9 #include "remoting/signaling/signal_strategy.h" | 11 #include "remoting/signaling/signal_strategy.h" |
10 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 12 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
11 #include "third_party/webrtc/libjingle/xmpp/constants.h" | 13 #include "third_party/webrtc/libjingle/xmpp/constants.h" |
12 | 14 |
13 using buzz::QName; | 15 using buzz::QName; |
14 using buzz::XmlElement; | 16 using buzz::XmlElement; |
15 | 17 |
16 namespace remoting { | 18 namespace remoting { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 if (pending_entries_.empty()) { | 58 if (pending_entries_.empty()) { |
57 return; | 59 return; |
58 } | 60 } |
59 // Make one stanza containing all the pending entries. | 61 // Make one stanza containing all the pending entries. |
60 scoped_ptr<XmlElement> stanza(ServerLogEntry::MakeStanza()); | 62 scoped_ptr<XmlElement> stanza(ServerLogEntry::MakeStanza()); |
61 while (!pending_entries_.empty()) { | 63 while (!pending_entries_.empty()) { |
62 ServerLogEntry& entry = pending_entries_.front(); | 64 ServerLogEntry& entry = pending_entries_.front(); |
63 stanza->AddElement(entry.ToStanza().release()); | 65 stanza->AddElement(entry.ToStanza().release()); |
64 pending_entries_.pop_front(); | 66 pending_entries_.pop_front(); |
65 } | 67 } |
66 // Send the stanza to the server. | 68 // Send the stanza to the server and ignore the response. |
67 scoped_ptr<IqRequest> req = iq_sender_->SendIq( | 69 iq_sender_->SendIq(buzz::STR_SET, directory_bot_jid_, std::move(stanza), |
68 buzz::STR_SET, directory_bot_jid_, stanza.Pass(), | 70 IqSender::ReplyCallback()); |
69 IqSender::ReplyCallback()); | |
70 // We ignore any response, so let the IqRequest be destroyed. | |
71 return; | |
72 } | 71 } |
73 | 72 |
74 } // namespace remoting | 73 } // namespace remoting |
OLD | NEW |