| 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 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 | 558 |
| 559 void MessageLoop::StartHistogrammer() { | 559 void MessageLoop::StartHistogrammer() { |
| 560 #if !defined(OS_NACL) // NaCl build has no metrics code. | 560 #if !defined(OS_NACL) // NaCl build has no metrics code. |
| 561 if (enable_histogrammer_ && !message_histogram_ | 561 if (enable_histogrammer_ && !message_histogram_ |
| 562 && StatisticsRecorder::IsActive()) { | 562 && StatisticsRecorder::IsActive()) { |
| 563 DCHECK(!thread_name_.empty()); | 563 DCHECK(!thread_name_.empty()); |
| 564 message_histogram_ = LinearHistogram::FactoryGetWithRangeDescription( | 564 message_histogram_ = LinearHistogram::FactoryGetWithRangeDescription( |
| 565 "MsgLoop:" + thread_name_, | 565 "MsgLoop:" + thread_name_, |
| 566 kLeastNonZeroMessageId, kMaxMessageId, | 566 kLeastNonZeroMessageId, kMaxMessageId, |
| 567 kNumberOfDistinctMessagesDisplayed, | 567 kNumberOfDistinctMessagesDisplayed, |
| 568 message_histogram_->kHexRangePrintingFlag, | 568 HistogramBase::kHexRangePrintingFlag, |
| 569 event_descriptions_); | 569 event_descriptions_); |
| 570 } | 570 } |
| 571 #endif | 571 #endif |
| 572 } | 572 } |
| 573 | 573 |
| 574 void MessageLoop::HistogramEvent(int event) { | 574 void MessageLoop::HistogramEvent(int event) { |
| 575 #if !defined(OS_NACL) | 575 #if !defined(OS_NACL) |
| 576 if (message_histogram_) | 576 if (message_histogram_) |
| 577 message_histogram_->Add(event); | 577 message_histogram_->Add(event); |
| 578 #endif | 578 #endif |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 persistent, | 747 persistent, |
| 748 mode, | 748 mode, |
| 749 controller, | 749 controller, |
| 750 delegate); | 750 delegate); |
| 751 } | 751 } |
| 752 #endif | 752 #endif |
| 753 | 753 |
| 754 #endif // !defined(OS_NACL_SFI) | 754 #endif // !defined(OS_NACL_SFI) |
| 755 | 755 |
| 756 } // namespace base | 756 } // namespace base |
| OLD | NEW |