Remove Thread::RunningForChannelManager().
I haven't heard of this failing, so it should be safe to remove. Let me know if this isn't the case.
BUG=3388
R=andrew@webrtc.org, wu@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/18659004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6695 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/base/thread.h b/talk/base/thread.h
index ef97862..d1e8495 100644
--- a/talk/base/thread.h
+++ b/talk/base/thread.h
@@ -235,11 +235,6 @@
// question to guarantee that the returned value remains true for the duration
// of whatever code is conditionally executing because of the return value!
bool RunningForTest() { return running(); }
- // This is a legacy call-site that probably doesn't need to exist in the first
- // place.
- // TODO(fischman): delete once the ASSERT added in channelmanager.cc sticks
- // for a month (ETA 2014/06/22).
- bool RunningForChannelManager() { return running(); }
protected:
// Blocks the calling thread until this thread has terminated.
diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc
index 88316b5..d933ea6 100644
--- a/talk/session/media/channelmanager.cc
+++ b/talk/session/media/channelmanager.cc
@@ -217,11 +217,7 @@
}
ASSERT(worker_thread_ != NULL);
- ASSERT(worker_thread_->RunningForChannelManager());
- // TODO(fischman): remove the if below (and
- // Thread::RunningForChannelManager()) once the ASSERT above has stuck for a
- // month (2014/06/22).
- if (worker_thread_ && worker_thread_->RunningForChannelManager()) {
+ if (worker_thread_) {
if (media_engine_->Init(worker_thread_)) {
initialized_ = true;
diff --git a/talk/session/media/channelmanager_unittest.cc b/talk/session/media/channelmanager_unittest.cc
index cbf19f8..1923289 100644
--- a/talk/session/media/channelmanager_unittest.cc
+++ b/talk/session/media/channelmanager_unittest.cc
@@ -121,15 +121,6 @@
EXPECT_FALSE(cm_->initialized());
}
-// Test that we fail to startup if we're given an unstarted thread.
-// TODO(fischman): delete once Thread::RunningForChannelManager() is gone
-// (webrtc:3388).
-TEST_F(ChannelManagerTest, DISABLED_StartupShutdownOnUnstartedThread) {
- EXPECT_TRUE(cm_->set_worker_thread(&worker_));
- EXPECT_FALSE(cm_->Init());
- EXPECT_FALSE(cm_->initialized());
-}
-
// Test that we can create and destroy a voice and video channel.
TEST_F(ChannelManagerTest, CreateDestroyChannels) {
EXPECT_TRUE(cm_->Init());
diff --git a/webrtc/base/thread.h b/webrtc/base/thread.h
index 6132aa0..742ba6d 100644
--- a/webrtc/base/thread.h
+++ b/webrtc/base/thread.h
@@ -218,11 +218,6 @@
// question to guarantee that the returned value remains true for the duration
// of whatever code is conditionally executing because of the return value!
bool RunningForTest() { return running(); }
- // This is a legacy call-site that probably doesn't need to exist in the first
- // place.
- // TODO(fischman): delete once the ASSERT added in channelmanager.cc sticks
- // for a month (ETA 2014/06/22).
- bool RunningForChannelManager() { return running(); }
protected:
// Blocks the calling thread until this thread has terminated.