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

Unified Diff: mojo/public/cpp/bindings/tests/router_test_util.h

Issue 2766523002: mojo: MessageReceiver*::AcceptWithResponder() now take a unique_ptr to the responder (Closed)
Patch Set: comments Created 3 years, 9 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: mojo/public/cpp/bindings/tests/router_test_util.h
diff --git a/mojo/public/cpp/bindings/tests/router_test_util.h b/mojo/public/cpp/bindings/tests/router_test_util.h
index c6fb372d3f426283dd19e58496bd2cee0a105b2b..dd6aff63dadee32d25cc8428fd685b7357b7c261 100644
--- a/mojo/public/cpp/bindings/tests/router_test_util.h
+++ b/mojo/public/cpp/bindings/tests/router_test_util.h
@@ -42,9 +42,9 @@ class ResponseGenerator : public MessageReceiverWithResponderStatus {
bool Accept(Message* message) override;
- bool AcceptWithResponder(Message* message,
- MessageReceiverWithStatus* responder) override;
-
+ bool AcceptWithResponder(
+ Message* message,
+ std::unique_ptr<MessageReceiverWithStatus> responder) override;
bool SendResponse(uint32_t name,
uint64_t request_id,
const char* request_string,
@@ -58,8 +58,9 @@ class LazyResponseGenerator : public ResponseGenerator {
~LazyResponseGenerator() override;
- bool AcceptWithResponder(Message* message,
- MessageReceiverWithStatus* responder) override;
+ bool AcceptWithResponder(
+ Message* message,
+ std::unique_ptr<MessageReceiverWithStatus> responder) override;
bool has_responder() const { return !!responder_; }
@@ -78,7 +79,7 @@ class LazyResponseGenerator : public ResponseGenerator {
// also sends a response.
void Complete(bool send_response);
- MessageReceiverWithStatus* responder_;
+ std::unique_ptr<MessageReceiverWithStatus> responder_;
uint32_t name_;
uint64_t request_id_;
std::string request_string_;
« no previous file with comments | « mojo/public/cpp/bindings/tests/multiplex_router_unittest.cc ('k') | mojo/public/cpp/bindings/tests/router_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698