Remove no-longer-needed IsBusy...() stuff.

R=azani@chromium.org
BUG=fixes #782

Review URL: https://codereview.chromium.org/2047823002 .
diff --git a/mojo/edk/system/data_pipe.cc b/mojo/edk/system/data_pipe.cc
index d671a76..4a6d5ae 100644
--- a/mojo/edk/system/data_pipe.cc
+++ b/mojo/edk/system/data_pipe.cc
@@ -457,11 +457,6 @@
   return rv;
 }
 
-bool DataPipe::ProducerIsBusy() const {
-  MutexLocker locker(&mutex_);
-  return producer_in_two_phase_write_no_lock();
-}
-
 void DataPipe::ConsumerCancelAllState() {
   MutexLocker locker(&mutex_);
   ConsumerCancelAllStateNoLock();
@@ -681,11 +676,6 @@
   return rv;
 }
 
-bool DataPipe::ConsumerIsBusy() const {
-  MutexLocker locker(&mutex_);
-  return consumer_in_two_phase_read_no_lock();
-}
-
 DataPipe::DataPipe(bool has_local_producer,
                    bool has_local_consumer,
                    const MojoCreateDataPipeOptions& validated_options,
diff --git a/mojo/edk/system/data_pipe.h b/mojo/edk/system/data_pipe.h
index 4437b76..7ab0f3f 100644
--- a/mojo/edk/system/data_pipe.h
+++ b/mojo/edk/system/data_pipe.h
@@ -128,7 +128,6 @@
       void* destination,
       size_t* actual_size,
       std::vector<platform::ScopedPlatformHandle>* platform_handles);
-  bool ProducerIsBusy() const;
 
   // These are called by the consumer dispatcher to implement its methods of
   // corresponding names.
@@ -163,7 +162,6 @@
       void* destination,
       size_t* actual_size,
       std::vector<platform::ScopedPlatformHandle>* platform_handles);
-  bool ConsumerIsBusy() const;
 
   // The following are only to be used by |DataPipeImpl| (and its subclasses):
 
diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.cc b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
index 0c6f7fa..fc14575 100644
--- a/mojo/edk/system/data_pipe_consumer_dispatcher.cc
+++ b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
@@ -230,10 +230,5 @@
   return rv;
 }
 
-bool DataPipeConsumerDispatcher::IsBusyNoLock() const {
-  mutex().AssertHeld();
-  return data_pipe_->ConsumerIsBusy();
-}
-
 }  // namespace system
 }  // namespace mojo
diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.h b/mojo/edk/system/data_pipe_consumer_dispatcher.h
index d7f232c..b7653b6 100644
--- a/mojo/edk/system/data_pipe_consumer_dispatcher.h
+++ b/mojo/edk/system/data_pipe_consumer_dispatcher.h
@@ -83,7 +83,6 @@
       size_t* actual_size,
       std::vector<platform::ScopedPlatformHandle>* platform_handles) override
       MOJO_NOT_THREAD_SAFE;
-  bool IsBusyNoLock() const override;
 
   // This will be null if closed.
   util::RefPtr<DataPipe> data_pipe_ MOJO_GUARDED_BY(mutex());
diff --git a/mojo/edk/system/data_pipe_producer_dispatcher.cc b/mojo/edk/system/data_pipe_producer_dispatcher.cc
index 69d38f5..febec06 100644
--- a/mojo/edk/system/data_pipe_producer_dispatcher.cc
+++ b/mojo/edk/system/data_pipe_producer_dispatcher.cc
@@ -205,10 +205,5 @@
   return rv;
 }
 
-bool DataPipeProducerDispatcher::IsBusyNoLock() const {
-  mutex().AssertHeld();
-  return data_pipe_->ProducerIsBusy();
-}
-
 }  // namespace system
 }  // namespace mojo
diff --git a/mojo/edk/system/data_pipe_producer_dispatcher.h b/mojo/edk/system/data_pipe_producer_dispatcher.h
index 1c2854b..7a218ad 100644
--- a/mojo/edk/system/data_pipe_producer_dispatcher.h
+++ b/mojo/edk/system/data_pipe_producer_dispatcher.h
@@ -83,7 +83,6 @@
       size_t* actual_size,
       std::vector<platform::ScopedPlatformHandle>* platform_handles) override
       MOJO_NOT_THREAD_SAFE;
-  bool IsBusyNoLock() const override;
 
   // This will be null if closed.
   util::RefPtr<DataPipe> data_pipe_ MOJO_GUARDED_BY(mutex());
diff --git a/mojo/edk/system/dispatcher.cc b/mojo/edk/system/dispatcher.cc
index 07308e6..7c4d929 100644
--- a/mojo/edk/system/dispatcher.cc
+++ b/mojo/edk/system/dispatcher.cc
@@ -525,14 +525,6 @@
   return false;
 }
 
-bool Dispatcher::IsBusyNoLock() const {
-  mutex_.AssertHeld();
-  DCHECK(!is_closed_);
-  // Most dispatchers support only "atomic" operations, so they are never busy
-  // (in this sense).
-  return false;
-}
-
 void Dispatcher::CloseNoLock() {
   mutex_.AssertHeld();
   DCHECK(!is_closed_);
diff --git a/mojo/edk/system/dispatcher.h b/mojo/edk/system/dispatcher.h
index c490342..30e2d5d 100644
--- a/mojo/edk/system/dispatcher.h
+++ b/mojo/edk/system/dispatcher.h
@@ -380,11 +380,6 @@
       std::vector<platform::ScopedPlatformHandle>* platform_handles)
       MOJO_NOT_THREAD_SAFE;
 
-  // This should be overridden to return true if/when there's an ongoing
-  // operation (e.g., two-phase read/writes on data pipes) that should prevent a
-  // handle from being sent over a message pipe (with status "busy").
-  virtual bool IsBusyNoLock() const MOJO_SHARED_LOCKS_REQUIRED(mutex_);
-
   util::Mutex& mutex() const MOJO_LOCK_RETURNED(mutex_) { return mutex_; }
 
  private:
diff --git a/mojo/edk/system/handle_transport.h b/mojo/edk/system/handle_transport.h
index bc3c8bb..1c88800 100644
--- a/mojo/edk/system/handle_transport.h
+++ b/mojo/edk/system/handle_transport.h
@@ -31,9 +31,6 @@
   void End() MOJO_NOT_THREAD_SAFE;
 
   Dispatcher::Type GetType() const { return dispatcher_->GetType(); }
-  bool IsBusy() const MOJO_NOT_THREAD_SAFE {
-    return dispatcher_->IsBusyNoLock();
-  }
   void Close() MOJO_NOT_THREAD_SAFE { dispatcher_->CloseNoLock(); }
   Handle CreateEquivalentHandleAndClose(MessagePipe* message_pipe,
                                         unsigned port) MOJO_NOT_THREAD_SAFE {
diff --git a/mojo/edk/system/platform_handle_dispatcher_unittest.cc b/mojo/edk/system/platform_handle_dispatcher_unittest.cc
index 70f5df7..2502622 100644
--- a/mojo/edk/system/platform_handle_dispatcher_unittest.cc
+++ b/mojo/edk/system/platform_handle_dispatcher_unittest.cc
@@ -104,7 +104,6 @@
   HandleTransport transport(test::HandleTryStartTransport(handle));
   EXPECT_TRUE(transport.is_valid());
   EXPECT_EQ(Dispatcher::Type::PLATFORM_HANDLE, transport.GetType());
-  EXPECT_FALSE(transport.IsBusy());
 
   Handle equivalent_handle =
       transport.CreateEquivalentHandleAndClose(nullptr, 0u);