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 <stack> | 9 #include <stack> |
10 #include <string> | 10 #include <string> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // escaped. There is no processing applied to the content after it is | 73 // escaped. There is no processing applied to the content after it is |
74 // appended. | 74 // appended. |
75 virtual void AppendAsTraceFormat(std::string* out) const = 0; | 75 virtual void AppendAsTraceFormat(std::string* out) const = 0; |
76 | 76 |
77 std::string ToString() const { | 77 std::string ToString() const { |
78 std::string result; | 78 std::string result; |
79 AppendAsTraceFormat(&result); | 79 AppendAsTraceFormat(&result); |
80 return result; | 80 return result; |
81 } | 81 } |
82 | 82 |
| 83 virtual std::string ToPrettyString() const; |
| 84 |
83 protected: | 85 protected: |
84 virtual ~ConvertableToTraceFormat() {} | 86 virtual ~ConvertableToTraceFormat() {} |
85 | 87 |
86 private: | 88 private: |
87 friend class RefCounted<ConvertableToTraceFormat>; | 89 friend class RefCounted<ConvertableToTraceFormat>; |
88 }; | 90 }; |
89 | 91 |
90 struct TraceEventHandle { | 92 struct TraceEventHandle { |
91 uint32 chunk_seq; | 93 uint32 chunk_seq; |
92 uint16 chunk_index; | 94 uint16 chunk_index; |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; | 814 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; |
813 subtle::AtomicWord generation_; | 815 subtle::AtomicWord generation_; |
814 | 816 |
815 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 817 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
816 }; | 818 }; |
817 | 819 |
818 } // namespace debug | 820 } // namespace debug |
819 } // namespace base | 821 } // namespace base |
820 | 822 |
821 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 823 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
OLD | NEW |