[fidl] Remove FIDL_ENABLE_LEGACY_WAIT_FOR_RESPONSE

These methods no longer have any clients.

Change-Id: I5bddf127fa5dcd3abc880cac746d877cf6ffe3fe
diff --git a/sdk/lib/fidl/cpp/fidl_cpp.api b/sdk/lib/fidl/cpp/fidl_cpp.api
index 994dbb5..4606be7 100644
--- a/sdk/lib/fidl/cpp/fidl_cpp.api
+++ b/sdk/lib/fidl/cpp/fidl_cpp.api
@@ -3,7 +3,7 @@
   "pkg/fidl_cpp/include/lib/fidl/cpp/binding_set.h": "b13c04fbe88f73c1e14ca743e3388e75",
   "pkg/fidl_cpp/include/lib/fidl/cpp/enum.h": "5619ea6a3305441008a4f0e6c4f237a6",
   "pkg/fidl_cpp/include/lib/fidl/cpp/event_sender.h": "2dbad5ac8938a3e5c27b881c9c54e467",
-  "pkg/fidl_cpp/include/lib/fidl/cpp/interface_ptr.h": "3e001ef5de66629788bb9c8f432dee4d",
+  "pkg/fidl_cpp/include/lib/fidl/cpp/interface_ptr.h": "5b42ba2946ca061d540d5ea805b65f32",
   "pkg/fidl_cpp/include/lib/fidl/cpp/interface_ptr_set.h": "3753ff1af3796f2b1528fc3cee26aa86",
   "pkg/fidl_cpp/include/lib/fidl/cpp/internal/header.h": "86ab0ed0df18e64d2dcf61f1b9b159a5",
   "pkg/fidl_cpp/include/lib/fidl/cpp/internal/implementation.h": "8dfc64d045bbfb27491e60988ba56c07",
diff --git a/sdk/lib/fidl/cpp/interface_ptr.h b/sdk/lib/fidl/cpp/interface_ptr.h
index ed55158..3bf5346 100644
--- a/sdk/lib/fidl/cpp/interface_ptr.h
+++ b/sdk/lib/fidl/cpp/interface_ptr.h
@@ -217,45 +217,6 @@
   // Events for unbound callbacks are ignored.
   Proxy& events() const { return impl_->proxy; }
 
-#ifdef FIDL_ENABLE_LEGACY_WAIT_FOR_RESPONSE
-
-  // DEPRECATED: Using InterfaceSyncPtr instead. If used in a test, consider
-  // spinning the async::Loop instead.
-  //
-  // Blocks the calling thread until either a message arrives on the previously
-  // bound channel or an error occurs.
-  //
-  // Returns an error if waiting for the message, reading the message, or
-  // processing the message fails. If the error results in the channel being
-  // closed, the error handler will be called synchronously before this
-  // method returns.
-  //
-  // This method can be called only if this |InterfacePtr| is currently bound to
-  // a channel.
-  zx_status_t WaitForResponse() {
-    return WaitForResponseUntil(zx::time::infinite());
-  }
-
-  // DEPRECATED: Using InterfaceSyncPtr instead. If used in a test, consider
-  // spinning the async::Loop instead.
-  //
-  // Blocks the calling thread until either a message arrives on the previously
-  // bound channel, an error occurs, or the |deadline| is exceeded.
-  //
-  // Returns ZX_ERR_TIMED_OUT if the deadline is exceeded.
-  //
-  // Returns an error if waiting for the message, reading the message, or
-  // processing the message fails. If the error results in the channel being
-  // closed, the error handler will be called synchronously before this
-  // method returns.
-  //
-  // This method can be called only if this |InterfacePtr| is currently bound to
-  // a channel.
-  zx_status_t WaitForResponseUntil(zx::time deadline) {
-    return impl_->controller.reader().WaitAndDispatchOneMessageUntil(deadline);
-  }
-#endif
-
   // Sets an error handler that will be called if an error causes the underlying
   // channel to be closed.
   //
diff --git a/sdk/lib/fidl/cpp/interface_ptr_unittest.cc b/sdk/lib/fidl/cpp/interface_ptr_unittest.cc
index ffbf8d4..13f24af 100644
--- a/sdk/lib/fidl/cpp/interface_ptr_unittest.cc
+++ b/sdk/lib/fidl/cpp/interface_ptr_unittest.cc
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#define FIDL_ENABLE_LEGACY_WAIT_FOR_RESPONSE
-
 #include "lib/fidl/cpp/interface_ptr.h"
 
 #include <lib/async-loop/cpp/loop.h>
@@ -43,8 +41,6 @@
   EXPECT_FALSE(ptr.is_bound());
   EXPECT_EQ(ZX_OK, ptr.Bind(std::move(handle)));
   EXPECT_TRUE(ptr.is_bound());
-
-  EXPECT_EQ(ZX_ERR_TIMED_OUT, ptr.WaitForResponseUntil(zx::time()));
 }
 
 TEST(InterfacePtr, BindToSpecificDispatcher) {
@@ -137,16 +133,14 @@
   EXPECT_EQ(ZX_OK, message.Write(h2.get(), 0));
 
   EXPECT_EQ(0, reply_count);
-  EXPECT_EQ(ZX_ERR_BAD_STATE, ptr.WaitForResponse());
-  EXPECT_EQ(0, reply_count);
-  EXPECT_EQ(ZX_OK, ptr2.WaitForResponse());
+  loop.RunUntilIdle();
   EXPECT_EQ(1, reply_count);
 
   EXPECT_EQ(0, error_count);
   EXPECT_EQ(ZX_OK, h2.write(0, "a", 1, nullptr, 0));
   EXPECT_EQ(0, error_count);
   EXPECT_TRUE(ptr2.is_bound());
-  EXPECT_EQ(ZX_ERR_INVALID_ARGS, ptr2.WaitForResponse());
+  loop.RunUntilIdle();
   EXPECT_EQ(1, reply_count);
   EXPECT_EQ(1, error_count);
   EXPECT_FALSE(ptr2.is_bound());
@@ -189,16 +183,14 @@
   EXPECT_EQ(ZX_OK, message.Write(h2.get(), 0));
 
   EXPECT_EQ(0, reply_count);
-  EXPECT_EQ(ZX_ERR_BAD_STATE, ptr.WaitForResponse());
-  EXPECT_EQ(0, reply_count);
-  EXPECT_EQ(ZX_OK, ptr2.WaitForResponse());
+  loop.RunUntilIdle();
   EXPECT_EQ(1, reply_count);
 
   EXPECT_EQ(0, error_count);
   EXPECT_EQ(ZX_OK, h2.write(0, "a", 1, nullptr, 0));
   EXPECT_EQ(0, error_count);
   EXPECT_TRUE(ptr2.is_bound());
-  EXPECT_EQ(ZX_ERR_INVALID_ARGS, ptr2.WaitForResponse());
+  loop.RunUntilIdle();
   EXPECT_EQ(1, reply_count);
   EXPECT_EQ(1, error_count);
   EXPECT_FALSE(ptr2.is_bound());
@@ -322,7 +314,7 @@
   loop.RunUntilIdle();
   EXPECT_EQ(ZX_OK, response.Read(h3.get(), 0));
   EXPECT_EQ(ZX_OK, response.Write(h2.get(), 0));
-  EXPECT_EQ(ZX_OK, ptr.WaitForResponse());
+  loop.RunUntilIdle();
   EXPECT_EQ(1, reply_count);
 }