| Index: base/threading/simple_thread.cc
|
| diff --git a/base/threading/simple_thread.cc b/base/threading/simple_thread.cc
|
| index 2b030f6e658c83dec356473c980785313eb17136..444147797586d21ab542c3dbae127308763ae903 100644
|
| --- a/base/threading/simple_thread.cc
|
| +++ b/base/threading/simple_thread.cc
|
| @@ -10,6 +10,22 @@
|
|
|
| namespace base {
|
|
|
| +SimpleThread::SimpleThread(const std::string& name_prefix)
|
| + : name_prefix_(name_prefix), name_(name_prefix),
|
| + thread_(), event_(true, false), tid_(0), joined_(false) {
|
| +}
|
| +
|
| +SimpleThread::SimpleThread(const std::string& name_prefix,
|
| + const Options& options)
|
| + : name_prefix_(name_prefix), name_(name_prefix), options_(options),
|
| + thread_(), event_(true, false), tid_(0), joined_(false) {
|
| +}
|
| +
|
| +SimpleThread::~SimpleThread() {
|
| + DCHECK(HasBeenStarted()) << "SimpleThread was never started.";
|
| + DCHECK(HasBeenJoined()) << "SimpleThread destroyed without being Join()ed.";
|
| +}
|
| +
|
| void SimpleThread::Start() {
|
| DCHECK(!HasBeenStarted()) << "Tried to Start a thread multiple times.";
|
| bool success = PlatformThread::Create(options_.stack_size(), this, &thread_);
|
| @@ -37,22 +53,6 @@ void SimpleThread::ThreadMain() {
|
| Run();
|
| }
|
|
|
| -SimpleThread::SimpleThread(const std::string& name_prefix)
|
| - : name_prefix_(name_prefix), name_(name_prefix),
|
| - thread_(), event_(true, false), tid_(0), joined_(false) {
|
| -}
|
| -
|
| -SimpleThread::SimpleThread(const std::string& name_prefix,
|
| - const Options& options)
|
| - : name_prefix_(name_prefix), name_(name_prefix), options_(options),
|
| - thread_(), event_(true, false), tid_(0), joined_(false) {
|
| -}
|
| -
|
| -SimpleThread::~SimpleThread() {
|
| - DCHECK(HasBeenStarted()) << "SimpleThread was never started.";
|
| - DCHECK(HasBeenJoined()) << "SimpleThread destroyed without being Join()ed.";
|
| -}
|
| -
|
| DelegateSimpleThread::DelegateSimpleThread(Delegate* delegate,
|
| const std::string& name_prefix)
|
| : SimpleThread(name_prefix),
|
|
|