Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: remoting/jingle_glue/xmpp_iq_request.cc

Issue 7744058: IqRequest implementations: calls the callback when response is received. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/javascript_iq_request.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « remoting/jingle_glue/javascript_iq_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698