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 "remoting/host/log_to_server.h" | 5 #include "remoting/host/log_to_server.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
10 #include "remoting/host/chromoting_host.h" | 10 #include "remoting/host/chromoting_host.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 return; | 90 return; |
91 } | 91 } |
92 if (pending_entries_.empty()) { | 92 if (pending_entries_.empty()) { |
93 return; | 93 return; |
94 } | 94 } |
95 // Make one stanza containing all the pending entries. | 95 // Make one stanza containing all the pending entries. |
96 scoped_ptr<XmlElement> stanza(new XmlElement(QName( | 96 scoped_ptr<XmlElement> stanza(new XmlElement(QName( |
97 kChromotingXmlNamespace, kLogCommand))); | 97 kChromotingXmlNamespace, kLogCommand))); |
98 while (!pending_entries_.empty()) { | 98 while (!pending_entries_.empty()) { |
99 ServerLogEntry& entry = pending_entries_.front(); | 99 ServerLogEntry& entry = pending_entries_.front(); |
100 stanza->AddElement(entry.ToStanza()); | 100 stanza->AddElement(entry.ToStanza().release()); |
101 pending_entries_.pop_front(); | 101 pending_entries_.pop_front(); |
102 } | 102 } |
103 // Send the stanza to the server. | 103 // Send the stanza to the server. |
104 scoped_ptr<IqRequest> req = iq_sender_->SendIq( | 104 scoped_ptr<IqRequest> req = iq_sender_->SendIq( |
105 buzz::STR_SET, kChromotingBotJid, stanza.Pass(), | 105 buzz::STR_SET, kChromotingBotJid, stanza.Pass(), |
106 IqSender::ReplyCallback()); | 106 IqSender::ReplyCallback()); |
107 // We ignore any response, so let the IqRequest be destroyed. | 107 // We ignore any response, so let the IqRequest be destroyed. |
108 return; | 108 return; |
109 } | 109 } |
110 | 110 |
111 } // namespace remoting | 111 } // namespace remoting |
OLD | NEW |