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

Side by Side Diff: base/trace_event/common/trace_event_common.h

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 header file defines the set of trace_event macros without specifying 5 // This header file defines the set of trace_event macros without specifying
6 // how the events actually get collected and stored. If you need to expose trace 6 // how the events actually get collected and stored. If you need to expose trace
7 // events to some other universe, you can copy-and-paste this file as well as 7 // events to some other universe, you can copy-and-paste this file as well as
8 // trace_event.h, modifying the macros contained there as necessary for the 8 // trace_event.h, modifying the macros contained there as necessary for the
9 // target platform. The end result is that multiple libraries can funnel events 9 // target platform. The end result is that multiple libraries can funnel events
10 // through to a shared trace event collector. 10 // through to a shared trace event collector.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // MyData() {} 149 // MyData() {}
150 // void AppendAsTraceFormat(std::string* out) const override { 150 // void AppendAsTraceFormat(std::string* out) const override {
151 // out->append("{\"foo\":1}"); 151 // out->append("{\"foo\":1}");
152 // } 152 // }
153 // private: 153 // private:
154 // ~MyData() override {} 154 // ~MyData() override {}
155 // DISALLOW_COPY_AND_ASSIGN(MyData); 155 // DISALLOW_COPY_AND_ASSIGN(MyData);
156 // }; 156 // };
157 // 157 //
158 // TRACE_EVENT1("foo", "bar", "data", 158 // TRACE_EVENT1("foo", "bar", "data",
159 // scoped_ptr<ConvertableToTraceFormat>(new MyData())); 159 // std::unique_ptr<ConvertableToTraceFormat>(new MyData()));
160 // 160 //
161 // The trace framework will take ownership if the passed pointer and it will 161 // The trace framework will take ownership if the passed pointer and it will
162 // be free'd when the trace buffer is flushed. 162 // be free'd when the trace buffer is flushed.
163 // 163 //
164 // Note, we only do the conversion when the buffer is flushed, so the provided 164 // Note, we only do the conversion when the buffer is flushed, so the provided
165 // data object should not be modified after it's passed to the trace framework. 165 // data object should not be modified after it's passed to the trace framework.
166 // 166 //
167 // 167 //
168 // Thread Safety: 168 // Thread Safety:
169 // A thread safe singleton and mutex are used for thread safety. Category 169 // A thread safe singleton and mutex are used for thread safety. Category
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1088
1089 // Enum reflecting the scope of an INSTANT event. Must fit within 1089 // Enum reflecting the scope of an INSTANT event. Must fit within
1090 // TRACE_EVENT_FLAG_SCOPE_MASK. 1090 // TRACE_EVENT_FLAG_SCOPE_MASK.
1091 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) 1091 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3))
1092 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) 1092 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3))
1093 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) 1093 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3))
1094 1094
1095 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') 1095 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g')
1096 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') 1096 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p')
1097 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') 1097 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t')
OLDNEW
« no previous file with comments | « base/trace_event/blame_context_unittest.cc ('k') | base/trace_event/heap_profiler_heap_dump_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698