Index: remoting/jingle_glue/mock_objects.h |
diff --git a/remoting/jingle_glue/mock_objects.h b/remoting/jingle_glue/mock_objects.h |
index e32e203772c732789efb0168bd0847aee2a57972..6c93b0a6fc352875ca99adb212d3b0e01ec9a9e3 100644 |
--- a/remoting/jingle_glue/mock_objects.h |
+++ b/remoting/jingle_glue/mock_objects.h |
@@ -30,12 +30,12 @@ class MockIqRequest : public IqRequest { |
MOCK_METHOD3(SendIq, void(const std::string& type, |
const std::string& addressee, |
buzz::XmlElement* iq_body)); |
- MOCK_METHOD1(set_callback, void(IqRequest::ReplyCallback*)); |
+ MOCK_METHOD1(set_callback, void(const IqRequest::ReplyCallback&)); |
// Ensure this takes ownership of the pointer, as the real IqRequest object |
// would, to avoid memory-leak. |
- void set_callback_hook(IqRequest::ReplyCallback* callback) { |
- callback_.reset(callback); |
+ void set_callback_hook(const IqRequest::ReplyCallback& callback) { |
+ callback_ = callback; |
} |
void Init() { |
@@ -44,10 +44,10 @@ class MockIqRequest : public IqRequest { |
this, &MockIqRequest::set_callback_hook)); |
} |
- IqRequest::ReplyCallback* callback() { return callback_.get(); } |
+ ReplyCallback& callback() { return callback_; } |
private: |
- scoped_ptr<IqRequest::ReplyCallback> callback_; |
+ ReplyCallback callback_; |
}; |
} // namespace remoting |