Index: base/threading/thread.cc |
diff --git a/base/threading/thread.cc b/base/threading/thread.cc |
index 63b07cbce6935bce5dcc203e289b4b8d58dc2af7..085ecb9ec99b8636fd862e5c12bf63b430bb0693 100644 |
--- a/base/threading/thread.cc |
+++ b/base/threading/thread.cc |
@@ -13,10 +13,6 @@ |
#include "base/threading/thread_local.h" |
#include "base/threading/thread_restrictions.h" |
-#if defined(OS_WIN) |
-#include "base/win/scoped_com_initializer.h" |
-#endif |
- |
namespace base { |
namespace { |
@@ -56,9 +52,6 @@ Thread::Options::~Options() { |
Thread::Thread(const std::string& name) |
: |
-#if defined(OS_WIN) |
- com_status_(NONE), |
-#endif |
stopping_(false), |
running_(false), |
thread_(0), |
@@ -73,20 +66,11 @@ Thread::~Thread() { |
bool Thread::Start() { |
Options options; |
-#if defined(OS_WIN) |
- if (com_status_ == STA) |
- options.message_loop_type = MessageLoop::TYPE_UI; |
-#endif |
return StartWithOptions(options); |
} |
bool Thread::StartWithOptions(const Options& options) { |
DCHECK(!message_loop_); |
-#if defined(OS_WIN) |
- DCHECK((com_status_ != STA) || |
- (options.message_loop_type == MessageLoop::TYPE_UI)); |
-#endif |
- |
SetThreadWasQuitProperly(false); |
MessageLoop::Type type = options.message_loop_type; |
@@ -225,15 +209,6 @@ void Thread::ThreadMain() { |
message_loop_->set_thread_name(name_); |
message_loop_->SetTimerSlack(message_loop_timer_slack_); |
-#if defined(OS_WIN) |
- scoped_ptr<win::ScopedCOMInitializer> com_initializer; |
- if (com_status_ != NONE) { |
- com_initializer.reset((com_status_ == STA) ? |
- new win::ScopedCOMInitializer() : |
- new win::ScopedCOMInitializer(win::ScopedCOMInitializer::kMTA)); |
- } |
-#endif |
- |
// Make sure the thread_id() returns current thread. |
// (This internally acquires lock against PlatformThread::Create) |
DCHECK_EQ(thread_id(), PlatformThread::CurrentId()); |
@@ -258,10 +233,6 @@ void Thread::ThreadMain() { |
// Let the thread do extra cleanup. |
CleanUp(); |
-#if defined(OS_WIN) |
- com_initializer.reset(); |
-#endif |
- |
// Assert that MessageLoop::Quit was called by ThreadQuitHelper. |
DCHECK(GetThreadWasQuitProperly()); |