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

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

Issue 2515873003: Mojo C++ Bindings: Introduce mojo::SupportsStrongBinding
Patch Set: . Created 4 years, 1 month 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/interface_ptr_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
index 0a2f669597ccace6b3ec72d613d0fd28e8a73cd0..64f92933ebc546190a7504145b55dbb775fdeb37 100644
--- a/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc
@@ -480,7 +480,8 @@ TEST_F(InterfacePtrTest, RequireVersion) {
EXPECT_EQ(456, impl.integer());
}
-class StrongMathCalculatorImpl : public math::Calculator {
+class StrongMathCalculatorImpl
+ : public SupportsStrongBinding<math::Calculator> {
public:
StrongMathCalculatorImpl(bool* destroyed) : destroyed_(destroyed) {}
~StrongMathCalculatorImpl() override { *destroyed_ = true; }
@@ -613,7 +614,7 @@ TEST(WeakConnectorTest, Math) {
EXPECT_FALSE(destroyed);
}
-class CImpl : public C {
+class CImpl : public SupportsStrongBinding<C> {
public:
CImpl(bool* d_called, const base::Closure& closure)
: d_called_(d_called), closure_(closure) {}
@@ -629,7 +630,7 @@ class CImpl : public C {
base::Closure closure_;
};
-class BImpl : public B {
+class BImpl : public SupportsStrongBinding<B> {
public:
BImpl(bool* d_called, const base::Closure& closure)
: d_called_(d_called), closure_(closure) {}

Powered by Google App Engine
This is Rietveld 408576698