Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1495)

Side by Side Diff: webkit/glue/webkitplatformsupport_impl.cc

Issue 9155024: Allow tracing in third_party libraries (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win compile Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/test/trace_event_analyzer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « base/test/trace_event_analyzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698