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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // Copied from histogram macro, but without the static variable caching | 285 // Copied from histogram macro, but without the static variable caching |
286 // the histogram because name is dynamic. | 286 // the histogram because name is dynamic. |
287 base::Histogram* counter = | 287 base::Histogram* counter = |
288 base::LinearHistogram::FactoryGet(name, 1, boundary_value, | 288 base::LinearHistogram::FactoryGet(name, 1, boundary_value, |
289 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); | 289 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); |
290 DCHECK_EQ(name, counter->histogram_name()); | 290 DCHECK_EQ(name, counter->histogram_name()); |
291 counter->Add(sample); | 291 counter->Add(sample); |
292 } | 292 } |
293 | 293 |
294 bool WebKitPlatformSupportImpl::isTraceEventEnabled() const { | 294 bool WebKitPlatformSupportImpl::isTraceEventEnabled() const { |
295 return base::debug::TraceLog::GetCategory("webkit")->enabled; | 295 return !!*base::debug::TraceLog::GetCategoryEnabled("webkit"); |
296 } | 296 } |
297 | 297 |
298 void WebKitPlatformSupportImpl::traceEventBegin(const char* name, void* id, | 298 void WebKitPlatformSupportImpl::traceEventBegin(const char* name, void* id, |
299 const char* extra) { | 299 const char* extra) { |
300 TRACE_EVENT_BEGIN_ETW(name, id, extra); | 300 TRACE_EVENT_BEGIN_ETW(name, id, extra); |
301 } | 301 } |
302 | 302 |
303 void WebKitPlatformSupportImpl::traceEventEnd(const char* name, void* id, | 303 void WebKitPlatformSupportImpl::traceEventEnd(const char* name, void* id, |
304 const char* extra) { | 304 const char* extra) { |
305 TRACE_EVENT_END_ETW(name, id, extra); | 305 TRACE_EVENT_END_ETW(name, id, extra); |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 worker_task_runner->OnWorkerRunLoopStarted(runLoop); | 693 worker_task_runner->OnWorkerRunLoopStarted(runLoop); |
694 } | 694 } |
695 | 695 |
696 void WebKitPlatformSupportImpl::didStopWorkerRunLoop( | 696 void WebKitPlatformSupportImpl::didStopWorkerRunLoop( |
697 const WebKit::WebWorkerRunLoop& runLoop) { | 697 const WebKit::WebWorkerRunLoop& runLoop) { |
698 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 698 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
699 worker_task_runner->OnWorkerRunLoopStopped(runLoop); | 699 worker_task_runner->OnWorkerRunLoopStopped(runLoop); |
700 } | 700 } |
701 | 701 |
702 } // namespace webkit_glue | 702 } // namespace webkit_glue |
OLD | NEW |