summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/base.gypi2
-rw-r--r--base/message_loop.cc4
2 files changed, 6 insertions, 0 deletions
diff --git a/base/base.gypi b/base/base.gypi
index 337f722..c9137e5 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -594,6 +594,8 @@
'threading/sequenced_worker_pool.cc',
'third_party/dynamic_annotations/dynamic_annotations.c',
],
+ # Metrics won't work in the NaCl sandbox.
+ 'sources/': [ ['exclude', '^metrics/'] ],
}],
['OS == "android" and >(nacl_untrusted_build)==0', {
'sources!': [
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 21108eb..4c82ebc 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -620,6 +620,7 @@ void MessageLoop::AddToIncomingQueue(PendingTask* pending_task) {
// on each thread.
void MessageLoop::StartHistogrammer() {
+#if !defined(OS_NACL) // NaCl build has no metrics code.
if (enable_histogrammer_ && !message_histogram_
&& base::StatisticsRecorder::IsActive()) {
DCHECK(!thread_name_.empty());
@@ -630,11 +631,14 @@ void MessageLoop::StartHistogrammer() {
message_histogram_->kHexRangePrintingFlag);
message_histogram_->SetRangeDescriptions(event_descriptions_);
}
+#endif
}
void MessageLoop::HistogramEvent(int event) {
+#if !defined(OS_NACL)
if (message_histogram_)
message_histogram_->Add(event);
+#endif
}
bool MessageLoop::DoWork() {