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

Unified Diff: base/message_loop/message_loop.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/message_loop/message_loop.h ('k') | base/message_loop/message_loop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.cc
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index 4222c774dd58b20354d6b0e4c948efcbbf5abf1b..00b5c7982a9c47f223d18aeb82aa37d80485b3e7 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -140,10 +140,6 @@ MessageLoop::~MessageLoop() {
DCHECK(!run_loop_);
#endif
-#if defined(OS_WIN)
- if (in_high_res_mode_)
- Time::ActivateHighResolutionTimer(false);
-#endif
// Clean up any unprocessed tasks, but take care: deleting a task could
// result in the addition of more tasks (e.g., via DeleteSoon). We set a
// limit on the number of times we will allow a deleted task to generate more
@@ -374,14 +370,7 @@ scoped_ptr<MessageLoop> MessageLoop::CreateUnbound(
MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
: type_(type),
-#if defined(OS_WIN)
- pending_high_res_tasks_(0),
- in_high_res_mode_(false),
-#endif
nestable_tasks_allowed_(true),
-#if defined(OS_WIN)
- os_modal_loop_(false),
-#endif // OS_WIN
pump_factory_(pump_factory),
message_histogram_(NULL),
run_loop_(NULL),
@@ -413,14 +402,6 @@ void MessageLoop::RunHandler() {
StartHistogrammer();
-#if defined(OS_WIN)
- if (run_loop_->dispatcher_ && type() == TYPE_UI) {
- static_cast<MessagePumpForUI*>(pump_.get())->
- RunWithDispatcher(this, run_loop_->dispatcher_);
- return;
- }
-#endif
-
pump_->Run(this);
}
@@ -441,13 +422,6 @@ bool MessageLoop::ProcessNextDelayedNonNestableTask() {
void MessageLoop::RunTask(const PendingTask& pending_task) {
DCHECK(nestable_tasks_allowed_);
-#if defined(OS_WIN)
- if (pending_task.is_high_res) {
- pending_high_res_tasks_--;
- CHECK_GE(pending_high_res_tasks_, 0);
- }
-#endif
-
// Execute the task and assume the worst: It is probably not reentrant.
nestable_tasks_allowed_ = false;
@@ -517,12 +491,7 @@ void MessageLoop::ReloadWorkQueue() {
// load. That reduces the number of locks-per-task significantly when our
// queues get large.
if (work_queue_.empty()) {
-#if defined(OS_WIN)
- pending_high_res_tasks_ +=
- incoming_task_queue_->ReloadWorkQueue(&work_queue_);
-#else
incoming_task_queue_->ReloadWorkQueue(&work_queue_);
-#endif
}
}
@@ -626,17 +595,6 @@ bool MessageLoop::DoIdleWork() {
pump_->Quit();
// When we return we will do a kernel wait for more tasks.
-#if defined(OS_WIN)
- // On Windows we activate the high resolution timer so that the wait
- // _if_ triggered by the timer happens with good resolution. If we don't
- // do this the default resolution is 15ms which might not be acceptable
- // for some tasks.
- bool high_res = pending_high_res_tasks_ > 0;
- if (high_res != in_high_res_mode_) {
- in_high_res_mode_ = high_res;
- Time::ActivateHighResolutionTimer(in_high_res_mode_);
- }
-#endif
return false;
}
@@ -702,19 +660,7 @@ void MessageLoopForIO::RemoveIOObserver(
ToPumpIO(pump_.get())->RemoveIOObserver(io_observer);
}
-#if defined(OS_WIN)
-void MessageLoopForIO::RegisterIOHandler(HANDLE file, IOHandler* handler) {
- ToPumpIO(pump_.get())->RegisterIOHandler(file, handler);
-}
-
-bool MessageLoopForIO::RegisterJobObject(HANDLE job, IOHandler* handler) {
- return ToPumpIO(pump_.get())->RegisterJobObject(job, handler);
-}
-
-bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) {
- return ToPumpIO(pump_.get())->WaitForIOCompletion(timeout, filter);
-}
-#elif defined(OS_POSIX)
+#if defined(OS_POSIX)
bool MessageLoopForIO::WatchFileDescriptor(int fd,
bool persistent,
Mode mode,
« no previous file with comments | « base/message_loop/message_loop.h ('k') | base/message_loop/message_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698