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

Unified Diff: remoting/jingle_glue/iq_request.h

Issue 7744041: Use new callbacks in the IqRequest interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
Index: remoting/jingle_glue/iq_request.h
diff --git a/remoting/jingle_glue/iq_request.h b/remoting/jingle_glue/iq_request.h
index 9e946ad2f56724e17f1b92e515022176b93c9b50..015d2db9458191bcdb3d6a7dc74665ac6aeeedd0 100644
--- a/remoting/jingle_glue/iq_request.h
+++ b/remoting/jingle_glue/iq_request.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/callback_old.h"
+#include "base/callback.h"
#include "base/gtest_prod_util.h"
namespace buzz {
@@ -23,20 +23,18 @@ namespace remoting {
// callback with the response.
class IqRequest {
public:
- typedef Callback1<const buzz::XmlElement*>::Type ReplyCallback;
+ typedef base::Callback<void(const buzz::XmlElement*)> ReplyCallback;
IqRequest() {}
virtual ~IqRequest() {}
// Sends stanza of type |type| to |addressee|. |iq_body| contains body of
- // the stanza. Ownership of |iq_body| is transfered to IqRequest. Must
- // be called on the jingle thread.
+ // the stanza. Takes pwnership of |iq_body|.
virtual void SendIq(const std::string& type, const std::string& addressee,
buzz::XmlElement* iq_body) = 0;
- // Sets callback that is called when reply stanza is received. Callback
- // is called on the jingle thread.
- virtual void set_callback(ReplyCallback* callback) = 0;
+ // Sets callback that is called when reply stanza is received.
+ virtual void set_callback(const ReplyCallback& callback) = 0;
protected:
static buzz::XmlElement* MakeIqStanza(const std::string& type,
« no previous file with comments | « remoting/host/register_support_host_request_unittest.cc ('k') | remoting/jingle_glue/javascript_iq_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698