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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 void GetEnabledTraceCategories(std::vector<std::string>* included_out, | 202 void GetEnabledTraceCategories(std::vector<std::string>* included_out, |
203 std::vector<std::string>* excluded_out); | 203 std::vector<std::string>* excluded_out); |
204 | 204 |
205 // Disable tracing for all categories. | 205 // Disable tracing for all categories. |
206 void SetDisabled(); | 206 void SetDisabled(); |
207 // Helper method to enable/disable tracing for all categories. | 207 // Helper method to enable/disable tracing for all categories. |
208 void SetEnabled(bool enabled); | 208 void SetEnabled(bool enabled); |
209 bool IsEnabled() { return !!enable_count_; } | 209 bool IsEnabled() { return !!enable_count_; } |
210 | 210 |
211 #if defined(OS_ANDROID) | 211 #if defined(OS_ANDROID) |
212 static void InitATrace(); | 212 void StartATrace(); |
| 213 void StopATrace(); |
213 #endif | 214 #endif |
214 | 215 |
215 // Enabled state listeners give a callback when tracing is enabled or | 216 // 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 | 217 // disabled. This can be used to tie into other library's tracing systems |
217 // on-demand. | 218 // on-demand. |
218 class EnabledStateChangedObserver { | 219 class EnabledStateChangedObserver { |
219 public: | 220 public: |
220 // Called just before the tracing system becomes | 221 // Called just before the tracing system becomes |
221 // enabled. TraceLog::IsEnabled will return false at this point and trace | 222 // enabled. TraceLog::IsEnabled will return false at this point and trace |
222 // macros and methods called within the observer will deadlock. | 223 // macros and methods called within the observer will deadlock. |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 const unsigned char* watch_category_; | 388 const unsigned char* watch_category_; |
388 std::string watch_event_name_; | 389 std::string watch_event_name_; |
389 | 390 |
390 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 391 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
391 }; | 392 }; |
392 | 393 |
393 } // namespace debug | 394 } // namespace debug |
394 } // namespace base | 395 } // namespace base |
395 | 396 |
396 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 397 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
OLD | NEW |