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

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

Issue 2660733002: Mojo C++ bindings: introduce an optional array to store transferred interface IDs in messages. (Closed)
Patch Set: . Created 3 years, 11 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.cc
diff --git a/mojo/public/cpp/bindings/tests/router_test_util.cc b/mojo/public/cpp/bindings/tests/router_test_util.cc
index 31199128635a44b0108a095e30d6d089779c4e48..b9b93d84a4239ba7950d2c71baedecc4899216e6 100644
--- a/mojo/public/cpp/bindings/tests/router_test_util.cc
+++ b/mojo/public/cpp/bindings/tests/router_test_util.cc
@@ -17,7 +17,8 @@ namespace test {
void AllocRequestMessage(uint32_t name, const char* text, Message* message) {
size_t payload_size = strlen(text) + 1; // Plus null terminator.
- internal::RequestMessageBuilder builder(name, payload_size);
+ internal::MessageBuilder builder(name, Message::kFlagExpectsResponse,
+ payload_size, 0);
memcpy(builder.buffer()->Allocate(payload_size), text, payload_size);
*message = std::move(*builder.message());
}
@@ -27,7 +28,9 @@ void AllocResponseMessage(uint32_t name,
uint64_t request_id,
Message* message) {
size_t payload_size = strlen(text) + 1; // Plus null terminator.
- internal::ResponseMessageBuilder builder(name, payload_size, request_id);
+ internal::MessageBuilder builder(name, Message::kFlagIsResponse, payload_size,
+ 0);
+ builder.message()->set_request_id(request_id);
memcpy(builder.buffer()->Allocate(payload_size), text, payload_size);
*message = std::move(*builder.message());
}
« no previous file with comments | « mojo/public/cpp/bindings/tests/connector_unittest.cc ('k') | mojo/public/cpp/bindings/tests/union_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698