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

Unified Diff: base/threading/thread.cc

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: 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
« no previous file with comments | « base/threading/thread.h ('k') | base/threading/thread_local.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « base/threading/thread.h ('k') | base/threading/thread_local.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698