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

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

Issue 8373003: Implement WebKitPlatformSupport::isTraceCategoryEnabled. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 2 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
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« webkit/glue/webkitplatformsupport_impl.h ('K') | « webkit/glue/webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698