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

Unified Diff: remoting/jingle_glue/xmpp_iq_request.cc

Issue 7809003: Simplify IqRequest interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/jingle_glue/xmpp_iq_request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/xmpp_iq_request.cc
diff --git a/remoting/jingle_glue/xmpp_iq_request.cc b/remoting/jingle_glue/xmpp_iq_request.cc
index b8057c36014d892df09e0824818792322688151f..7e07665624fc9c0b4a78ff41004f8bae03afd5dd 100644
--- a/remoting/jingle_glue/xmpp_iq_request.cc
+++ b/remoting/jingle_glue/xmpp_iq_request.cc
@@ -25,20 +25,14 @@ XmppIqRequest::~XmppIqRequest() {
Unregister();
}
-void XmppIqRequest::SendIq(const std::string& type,
- const std::string& addressee,
- buzz::XmlElement* iq_body) {
+void XmppIqRequest::SendIq(buzz::XmlElement* stanza) {
DCHECK_EQ(MessageLoop::current(), message_loop_);
// Unregister the handler if it is already registered.
Unregister();
- DCHECK_GT(type.length(), 0U);
-
- scoped_ptr<buzz::XmlElement> stanza(MakeIqStanza(type, addressee, iq_body,
- xmpp_client_->NextId()));
-
- xmpp_client_->engine()->SendIq(stanza.get(), this, &cookie_);
+ stanza->AddAttr(buzz::QN_ID, xmpp_client_->NextId());
+ xmpp_client_->engine()->SendIq(stanza, this, &cookie_);
}
void XmppIqRequest::set_callback(const ReplyCallback& callback) {
« no previous file with comments | « remoting/jingle_glue/xmpp_iq_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698