OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/glue/webkitplatformsupport_impl.h" | 5 #include "webkit/glue/webkitplatformsupport_impl.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <malloc.h> | 8 #include <malloc.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 const char* name, int sample, int boundary_value) { | 282 const char* name, int sample, int boundary_value) { |
283 // Copied from histogram macro, but without the static variable caching | 283 // Copied from histogram macro, but without the static variable caching |
284 // the histogram because name is dynamic. | 284 // the histogram because name is dynamic. |
285 base::Histogram* counter = | 285 base::Histogram* counter = |
286 base::LinearHistogram::FactoryGet(name, 1, boundary_value, | 286 base::LinearHistogram::FactoryGet(name, 1, boundary_value, |
287 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); | 287 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); |
288 DCHECK_EQ(name, counter->histogram_name()); | 288 DCHECK_EQ(name, counter->histogram_name()); |
289 counter->Add(sample); | 289 counter->Add(sample); |
290 } | 290 } |
291 | 291 |
| 292 bool WebKitPlatformSupportImpl::isTraceEventEnabledForCategory( |
| 293 const char* category) const { |
| 294 return base::debug::TraceLog::GetCategory(category)->enabled; |
| 295 } |
| 296 |
292 void WebKitPlatformSupportImpl::traceEventBegin(const char* name, void* id, | 297 void WebKitPlatformSupportImpl::traceEventBegin(const char* name, void* id, |
293 const char* extra) { | 298 const char* extra) { |
294 TRACE_EVENT_BEGIN_ETW(name, id, extra); | 299 TRACE_EVENT_BEGIN_ETW(name, id, extra); |
295 } | 300 } |
296 | 301 |
297 void WebKitPlatformSupportImpl::traceEventEnd(const char* name, void* id, | 302 void WebKitPlatformSupportImpl::traceEventEnd(const char* name, void* id, |
298 const char* extra) { | 303 const char* extra) { |
299 TRACE_EVENT_END_ETW(name, id, extra); | 304 TRACE_EVENT_END_ETW(name, id, extra); |
300 } | 305 } |
301 | 306 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 } | 680 } |
676 | 681 |
677 // static | 682 // static |
678 void WebKitPlatformSupportImpl::DestroyCurrentThread(void* thread) { | 683 void WebKitPlatformSupportImpl::DestroyCurrentThread(void* thread) { |
679 WebThreadImplForMessageLoop* impl = | 684 WebThreadImplForMessageLoop* impl = |
680 static_cast<WebThreadImplForMessageLoop*>(thread); | 685 static_cast<WebThreadImplForMessageLoop*>(thread); |
681 delete impl; | 686 delete impl; |
682 } | 687 } |
683 | 688 |
684 } // namespace webkit_glue | 689 } // namespace webkit_glue |
OLD | NEW |