Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: base/debug/trace_event_impl.h

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/debug/trace_event_argument_unittest.cc ('k') | cc/base/math_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 namespace base { 58 namespace base {
59 59
60 class WaitableEvent; 60 class WaitableEvent;
61 class MessageLoop; 61 class MessageLoop;
62 62
63 namespace debug { 63 namespace debug {
64 64
65 // For any argument of type TRACE_VALUE_TYPE_CONVERTABLE the provided 65 // For any argument of type TRACE_VALUE_TYPE_CONVERTABLE the provided
66 // class must implement this interface. 66 // class must implement this interface.
67 class BASE_EXPORT ConvertableToTraceFormat 67 class ConvertableToTraceFormat : public RefCounted<ConvertableToTraceFormat> {
68 : public RefCounted<ConvertableToTraceFormat> {
69 public: 68 public:
70 // Append the class info to the provided |out| string. The appended 69 // Append the class info to the provided |out| string. The appended
71 // data must be a valid JSON object. Strings must be properly quoted, and 70 // data must be a valid JSON object. Strings must be properly quoted, and
72 // escaped. There is no processing applied to the content after it is 71 // escaped. There is no processing applied to the content after it is
73 // appended. 72 // appended.
74 virtual void AppendAsTraceFormat(std::string* out) const = 0; 73 virtual void AppendAsTraceFormat(std::string* out) const = 0;
75 74
76 std::string ToString() const {
77 std::string result;
78 AppendAsTraceFormat(&result);
79 return result;
80 }
81
82 protected: 75 protected:
83 virtual ~ConvertableToTraceFormat() {} 76 virtual ~ConvertableToTraceFormat() {}
84 77
85 private: 78 private:
86 friend class RefCounted<ConvertableToTraceFormat>; 79 friend class RefCounted<ConvertableToTraceFormat>;
87 }; 80 };
88 81
89 struct TraceEventHandle { 82 struct TraceEventHandle {
90 uint32 chunk_seq; 83 uint32 chunk_seq;
91 uint16 chunk_index; 84 uint16 chunk_index;
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; 737 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_;
745 subtle::AtomicWord generation_; 738 subtle::AtomicWord generation_;
746 739
747 DISALLOW_COPY_AND_ASSIGN(TraceLog); 740 DISALLOW_COPY_AND_ASSIGN(TraceLog);
748 }; 741 };
749 742
750 } // namespace debug 743 } // namespace debug
751 } // namespace base 744 } // namespace base
752 745
753 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ 746 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_
OLDNEW
« no previous file with comments | « base/debug/trace_event_argument_unittest.cc ('k') | cc/base/math_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698