| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_ | 5 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_ |
| 6 #define BASE_TRACE_EVENT_TRACE_LOG_H_ | 6 #define BASE_TRACE_EVENT_TRACE_LOG_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 // Exposed for unittesting: | 308 // Exposed for unittesting: |
| 309 | 309 |
| 310 void WaitSamplingEventForTesting(); | 310 void WaitSamplingEventForTesting(); |
| 311 | 311 |
| 312 // Allows deleting our singleton instance. | 312 // Allows deleting our singleton instance. |
| 313 static void DeleteForTesting(); | 313 static void DeleteForTesting(); |
| 314 | 314 |
| 315 class TraceEventFilter { | 315 class TraceEventFilter { |
| 316 public: | 316 public: |
| 317 static const char* const kEventWhitelistPredicate; |
| 318 static const char* const kHeapProfilerPredicate; |
| 319 |
| 317 TraceEventFilter() {} | 320 TraceEventFilter() {} |
| 318 virtual ~TraceEventFilter() {} | 321 virtual ~TraceEventFilter() {} |
| 319 virtual bool FilterTraceEvent(const TraceEvent& trace_event) const = 0; | 322 virtual bool FilterTraceEvent(const TraceEvent& trace_event) const = 0; |
| 320 virtual void EndEvent(const char* category_group, const char* name) {} | 323 virtual void EndEvent(const char* category_group, const char* name) {} |
| 321 | 324 |
| 322 private: | 325 private: |
| 323 DISALLOW_COPY_AND_ASSIGN(TraceEventFilter); | 326 DISALLOW_COPY_AND_ASSIGN(TraceEventFilter); |
| 324 }; | 327 }; |
| 325 typedef std::unique_ptr<TraceEventFilter> ( | 328 typedef std::unique_ptr<TraceEventFilter> ( |
| 326 *TraceEventFilterConstructorForTesting)(void); | 329 *TraceEventFilterConstructorForTesting)(void); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 subtle::AtomicWord generation_; | 547 subtle::AtomicWord generation_; |
| 545 bool use_worker_thread_; | 548 bool use_worker_thread_; |
| 546 | 549 |
| 547 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 550 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 548 }; | 551 }; |
| 549 | 552 |
| 550 } // namespace trace_event | 553 } // namespace trace_event |
| 551 } // namespace base | 554 } // namespace base |
| 552 | 555 |
| 553 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ | 556 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ |
| OLD | NEW |