| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 5 |
| 6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
| 7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 #if defined(OS_ANDROID) | 211 #if defined(OS_ANDROID) |
| 212 static void InitATrace(); | 212 static void InitATrace(); |
| 213 #endif | 213 #endif |
| 214 | 214 |
| 215 // Enabled state listeners give a callback when tracing is enabled or | 215 // Enabled state listeners give a callback when tracing is enabled or |
| 216 // disabled. This can be used to tie into other library's tracing systems | 216 // disabled. This can be used to tie into other library's tracing systems |
| 217 // on-demand. | 217 // on-demand. |
| 218 class EnabledStateChangedObserver { | 218 class EnabledStateChangedObserver { |
| 219 public: | 219 public: |
| 220 virtual ~EnabledStateChangedObserver() { } | |
| 221 | |
| 222 // Called just before the tracing system becomes | 220 // Called just before the tracing system becomes |
| 223 // enabled. TraceLog::IsEnabled will return false at this point and trace | 221 // enabled. TraceLog::IsEnabled will return false at this point and trace |
| 224 // macros and methods called within the observer will deadlock. | 222 // macros and methods called within the observer will deadlock. |
| 225 virtual void OnTraceLogWillEnable() { } | 223 virtual void OnTraceLogWillEnable() { } |
| 226 | 224 |
| 227 // Called just before the tracing system disables. TraceLog::IsEnabled is | 225 // Called just before the tracing system disables. TraceLog::IsEnabled is |
| 228 // still false at this point TRACE macros will still be capturing | 226 // still false at this point TRACE macros will still be capturing |
| 229 // data. However, trace macros and methods called within the observer will | 227 // data. However, trace macros and methods called within the observer will |
| 230 // deadlock. | 228 // deadlock. |
| 231 virtual void OnTraceLogWillDisable() { } | 229 virtual void OnTraceLogWillDisable() { } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 const unsigned char* watch_category_; | 387 const unsigned char* watch_category_; |
| 390 std::string watch_event_name_; | 388 std::string watch_event_name_; |
| 391 | 389 |
| 392 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 390 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 393 }; | 391 }; |
| 394 | 392 |
| 395 } // namespace debug | 393 } // namespace debug |
| 396 } // namespace base | 394 } // namespace base |
| 397 | 395 |
| 398 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 396 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
| OLD | NEW |