OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/jingle_glue/xmpp_iq_request.h" | 5 #include "remoting/jingle_glue/xmpp_iq_request.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "third_party/libjingle/source/talk/xmpp/constants.h" | 9 #include "third_party/libjingle/source/talk/xmpp/constants.h" |
10 #include "third_party/libjingle/source/talk/xmpp/xmppclient.h" | 10 #include "third_party/libjingle/source/talk/xmpp/xmppclient.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // No need to unregister the handler if the client has been destroyed. | 50 // No need to unregister the handler if the client has been destroyed. |
51 if (xmpp_client_) { | 51 if (xmpp_client_) { |
52 xmpp_client_->engine()->RemoveIqHandler(cookie_, NULL); | 52 xmpp_client_->engine()->RemoveIqHandler(cookie_, NULL); |
53 } | 53 } |
54 cookie_ = NULL; | 54 cookie_ = NULL; |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 void XmppIqRequest::IqResponse(buzz::XmppIqCookie cookie, | 58 void XmppIqRequest::IqResponse(buzz::XmppIqCookie cookie, |
59 const buzz::XmlElement* stanza) { | 59 const buzz::XmlElement* stanza) { |
60 if (callback_.is_null()) { | 60 if (!callback_.is_null()) { |
61 callback_.Run(stanza); | 61 callback_.Run(stanza); |
62 callback_.Reset(); | 62 callback_.Reset(); |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 } // namespace remoting | 66 } // namespace remoting |
OLD | NEW |