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

Unified Diff: remoting/jingle_glue/iq_sender.h

Issue 9447087: Revert 123635 - Implement timeouts for IQ requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/host/register_support_host_request_unittest.cc ('k') | remoting/jingle_glue/iq_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/iq_sender.h
===================================================================
--- remoting/jingle_glue/iq_sender.h (revision 123637)
+++ remoting/jingle_glue/iq_sender.h (working copy)
@@ -12,7 +12,6 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
#include "remoting/jingle_glue/signal_strategy.h"
namespace buzz {
@@ -28,10 +27,7 @@
// those requests.
class IqSender : public SignalStrategy::Listener {
public:
- // Callback that is called when an Iq response is received. Called
- // with the |response| set to NULL in case of a timeout.
- typedef base::Callback<void(IqRequest* request,
- const buzz::XmlElement* response)> ReplyCallback;
+ typedef base::Callback<void(const buzz::XmlElement*)> ReplyCallback;
explicit IqSender(SignalStrategy* signal_strategy);
virtual ~IqSender();
@@ -76,28 +72,19 @@
};
// This call must only be used on the thread it was created on.
-class IqRequest : public base::SupportsWeakPtr<IqRequest> {
+class IqRequest {
public:
- IqRequest(IqSender* sender, const IqSender::ReplyCallback& callback,
- const std::string& addressee);
+ IqRequest(IqSender* sender, const IqSender::ReplyCallback& callback);
~IqRequest();
- // Sets timeout for the request. When the timeout expires the
- // callback is called with the |response| set to NULL.
- void SetTimeout(base::TimeDelta timeout);
-
private:
friend class IqSender;
- void CallCallback(const buzz::XmlElement* stanza);
- void OnTimeout();
-
// Called by IqSender when a response is received.
void OnResponse(const buzz::XmlElement* stanza);
IqSender* sender_;
IqSender::ReplyCallback callback_;
- std::string addressee_;
DISALLOW_COPY_AND_ASSIGN(IqRequest);
};
« no previous file with comments | « remoting/host/register_support_host_request_unittest.cc ('k') | remoting/jingle_glue/iq_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698