OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 #else | 557 #else |
558 incoming_task_queue_->ReloadWorkQueue(&work_queue_); | 558 incoming_task_queue_->ReloadWorkQueue(&work_queue_); |
559 #endif | 559 #endif |
560 } | 560 } |
561 } | 561 } |
562 | 562 |
563 void MessageLoop::ScheduleWork() { | 563 void MessageLoop::ScheduleWork() { |
564 pump_->ScheduleWork(); | 564 pump_->ScheduleWork(); |
565 } | 565 } |
566 | 566 |
567 #if defined(OS_WIN) | |
568 bool MessageLoop::MessagePumpWasSignaled() { | |
569 return pump_->WasSignaled(); | |
570 } | |
571 #endif | |
572 | |
573 //------------------------------------------------------------------------------ | 567 //------------------------------------------------------------------------------ |
574 // Method and data for histogramming events and actions taken by each instance | 568 // Method and data for histogramming events and actions taken by each instance |
575 // on each thread. | 569 // on each thread. |
576 | 570 |
577 void MessageLoop::StartHistogrammer() { | 571 void MessageLoop::StartHistogrammer() { |
578 #if !defined(OS_NACL) // NaCl build has no metrics code. | 572 #if !defined(OS_NACL) // NaCl build has no metrics code. |
579 if (enable_histogrammer_ && !message_histogram_ | 573 if (enable_histogrammer_ && !message_histogram_ |
580 && StatisticsRecorder::IsActive()) { | 574 && StatisticsRecorder::IsActive()) { |
581 std::string thread_name = GetThreadName(); | 575 std::string thread_name = GetThreadName(); |
582 DCHECK(!thread_name.empty()); | 576 DCHECK(!thread_name.empty()); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 persistent, | 757 persistent, |
764 mode, | 758 mode, |
765 controller, | 759 controller, |
766 delegate); | 760 delegate); |
767 } | 761 } |
768 #endif | 762 #endif |
769 | 763 |
770 #endif // !defined(OS_NACL_SFI) | 764 #endif // !defined(OS_NACL_SFI) |
771 | 765 |
772 } // namespace base | 766 } // namespace base |
OLD | NEW |