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

Unified Diff: webrtc/system_wrappers/source/condition_variable_unittest.cc

Issue 1476453002: Clean up PlatformThread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: IsRunning DCHECK Created 5 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: webrtc/system_wrappers/source/condition_variable_unittest.cc
diff --git a/webrtc/system_wrappers/source/condition_variable_unittest.cc b/webrtc/system_wrappers/source/condition_variable_unittest.cc
index aad55ac611b7b70aacdc700439ba83712617d1cb..5a8dd0b36ea0d873953f799d1a778cda547bbb6c 100644
--- a/webrtc/system_wrappers/source/condition_variable_unittest.cc
+++ b/webrtc/system_wrappers/source/condition_variable_unittest.cc
@@ -144,12 +144,10 @@ bool WaitingRunFunction(void* obj) {
class CondVarTest : public ::testing::Test {
public:
- CondVarTest() {}
+ CondVarTest() : thread_(&WaitingRunFunction, &baton_, "CondVarTest") {}
virtual void SetUp() {
- thread_ = PlatformThread::CreateThread(&WaitingRunFunction, &baton_,
- "CondVarTest");
- ASSERT_TRUE(thread_->Start());
+ thread_.Start();
}
virtual void TearDown() {
@@ -160,14 +158,14 @@ class CondVarTest : public ::testing::Test {
// and Pass).
ASSERT_TRUE(baton_.Pass(kShortWaitMs));
ASSERT_TRUE(baton_.Grab(kShortWaitMs));
- ASSERT_TRUE(thread_->Stop());
+ thread_.Stop();
}
protected:
Baton baton_;
private:
- rtc::scoped_ptr<PlatformThread> thread_;
+ rtc::PlatformThread thread_;
};
// The SetUp and TearDown functions use condition variables.
« no previous file with comments | « webrtc/system_wrappers/include/data_log_impl.h ('k') | webrtc/system_wrappers/source/critical_section_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698