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

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

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: snapshot Created 6 years, 7 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/sample_service_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/sample_service_unittest.cc b/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
index 9a4cf3633f365db55cc91a2a3256ffcaab326422..dc2bba864ad65a30a7fea5c3500a1241657de97c 100644
--- a/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
@@ -266,7 +266,7 @@ void DumpHex(const uint8_t* bytes, uint32_t num_bytes) {
class ServiceImpl : public Service {
public:
- virtual void Frobinate(const Foo& foo, BazOptions baz, ScopedPortHandle port)
+ virtual void Frobinate(const Foo& foo, BazOptions baz, PortPtr port)
MOJO_OVERRIDE {
// Users code goes here to handle the incoming Frobinate message.
@@ -299,7 +299,8 @@ class SimpleMessageReceiver : public mojo::MessageReceiver {
// the system. It receives the incoming message.
ServiceImpl impl;
- ServiceStub stub(&impl);
+ ServiceStub stub;
+ stub.set_sink(&impl);
return stub.Accept(message);
}
@@ -328,8 +329,8 @@ TEST(BindingsSampleTest, Basic) {
Foo foo = MakeFoo();
CheckFoo(foo);
- mojo::InterfacePipe<Port, mojo::AnyInterface> pipe;
- service->Frobinate(foo, Service::BAZ_EXTRA, pipe.handle_to_self.Pass());
+ PortPtr port;
+ service->Frobinate(foo, Service::BAZ_EXTRA, port.Pass());
}
TEST(BindingsSampleTest, DefaultValues) {

Powered by Google App Engine
This is Rietveld 408576698