| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file contains the Windows-specific declarations for trace_event.h. | 5 // This file contains the Windows-specific declarations for trace_event.h. |
| 6 #ifndef BASE_DEBUG_TRACE_EVENT_WIN_H_ | 6 #ifndef BASE_DEBUG_TRACE_EVENT_WIN_H_ |
| 7 #define BASE_DEBUG_TRACE_EVENT_WIN_H_ | 7 #define BASE_DEBUG_TRACE_EVENT_WIN_H_ |
| 8 #pragma once | 8 #pragma once |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // std::string instances where not needed. | 78 // std::string instances where not needed. |
| 79 static void Trace(const char* name, | 79 static void Trace(const char* name, |
| 80 EventType type, | 80 EventType type, |
| 81 const void* id, | 81 const void* id, |
| 82 const char* extra) { | 82 const char* extra) { |
| 83 return Trace(name, -1, type, id, extra, -1); | 83 return Trace(name, -1, type, id, extra, -1); |
| 84 } | 84 } |
| 85 | 85 |
| 86 // Retrieves the singleton. | 86 // Retrieves the singleton. |
| 87 // Note that this may return NULL post-AtExit processing. | 87 // Note that this may return NULL post-AtExit processing. |
| 88 static TraceLog* Get(); | 88 static TraceLog* GetInstance(); |
| 89 | 89 |
| 90 // Returns true iff tracing is turned on. | 90 // Returns true iff tracing is turned on. |
| 91 bool IsTracing() { | 91 bool IsTracing() { |
| 92 return enable_level() >= TRACE_LEVEL_INFORMATION; | 92 return enable_level() >= TRACE_LEVEL_INFORMATION; |
| 93 } | 93 } |
| 94 | 94 |
| 95 // Emit a trace of type |type| containing |name|, |id|, and |extra|. | 95 // Emit a trace of type |type| containing |name|, |id|, and |extra|. |
| 96 // Note: |name| and |extra| must be NULL, or a zero-terminated string of | 96 // Note: |name| and |extra| must be NULL, or a zero-terminated string of |
| 97 // length |name_len| or |extra_len| respectively. | 97 // length |name_len| or |extra_len| respectively. |
| 98 // Note: if name_len or extra_len are -1, the length of the corresponding | 98 // Note: if name_len or extra_len are -1, the length of the corresponding |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // Optionally the stack trace, consisting of a DWORD "depth", followed | 142 // Optionally the stack trace, consisting of a DWORD "depth", followed |
| 143 // by an array of void* (machine bitness) of length "depth". | 143 // by an array of void* (machine bitness) of length "depth". |
| 144 | 144 |
| 145 // Forward decl. | 145 // Forward decl. |
| 146 struct TraceLogSingletonTraits; | 146 struct TraceLogSingletonTraits; |
| 147 | 147 |
| 148 } // nemspace debug | 148 } // nemspace debug |
| 149 } // namespace base | 149 } // namespace base |
| 150 | 150 |
| 151 #endif // BASE_DEBUG_TRACE_EVENT_WIN_H_ | 151 #endif // BASE_DEBUG_TRACE_EVENT_WIN_H_ |
| OLD | NEW |