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

Side by Side Diff: base/trace_event/trace_event_etw_export_win.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 file contains the Windows-specific exporting to ETW. 5 // This file contains the Windows-specific exporting to ETW.
6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ 6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_
7 #define BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ 7 #define BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // TraceLog::AddTraceEventWithThreadIdAndTimestamp to export internal events. 43 // TraceLog::AddTraceEventWithThreadIdAndTimestamp to export internal events.
44 static void AddEvent( 44 static void AddEvent(
45 char phase, 45 char phase,
46 const unsigned char* category_group_enabled, 46 const unsigned char* category_group_enabled,
47 const char* name, 47 const char* name,
48 unsigned long long id, 48 unsigned long long id,
49 int num_args, 49 int num_args,
50 const char** arg_names, 50 const char** arg_names,
51 const unsigned char* arg_types, 51 const unsigned char* arg_types,
52 const unsigned long long* arg_values, 52 const unsigned long long* arg_values,
53 const scoped_ptr<ConvertableToTraceFormat>* convertable_values); 53 const std::unique_ptr<ConvertableToTraceFormat>* convertable_values);
54 54
55 // Exports an ETW event that marks the end of a complete event. 55 // Exports an ETW event that marks the end of a complete event.
56 static void AddCompleteEndEvent(const char* name); 56 static void AddCompleteEndEvent(const char* name);
57 57
58 // Returns true if any category in the group is enabled. 58 // Returns true if any category in the group is enabled.
59 static bool IsCategoryGroupEnabled(const char* category_group_name); 59 static bool IsCategoryGroupEnabled(const char* category_group_name);
60 60
61 private: 61 private:
62 // Ensure only the provider can construct us. 62 // Ensure only the provider can construct us.
63 friend struct StaticMemorySingletonTraits<TraceEventETWExport>; 63 friend struct StaticMemorySingletonTraits<TraceEventETWExport>;
(...skipping 16 matching lines...) Expand all
80 bool etw_export_enabled_; 80 bool etw_export_enabled_;
81 81
82 // Maps category names to their status (enabled/disabled). 82 // Maps category names to their status (enabled/disabled).
83 std::map<StringPiece, bool> categories_status_; 83 std::map<StringPiece, bool> categories_status_;
84 84
85 // Local copy of the ETW keyword. 85 // Local copy of the ETW keyword.
86 uint64_t etw_match_any_keyword_; 86 uint64_t etw_match_any_keyword_;
87 87
88 // Background thread that monitors changes to the ETW keyword and updates 88 // Background thread that monitors changes to the ETW keyword and updates
89 // the enabled categories when a change occurs. 89 // the enabled categories when a change occurs.
90 scoped_ptr<ETWKeywordUpdateThread> keyword_update_thread_; 90 std::unique_ptr<ETWKeywordUpdateThread> keyword_update_thread_;
91 PlatformThreadHandle keyword_update_thread_handle_; 91 PlatformThreadHandle keyword_update_thread_handle_;
92 92
93 DISALLOW_COPY_AND_ASSIGN(TraceEventETWExport); 93 DISALLOW_COPY_AND_ASSIGN(TraceEventETWExport);
94 }; 94 };
95 95
96 } // namespace trace_event 96 } // namespace trace_event
97 } // namespace base 97 } // namespace base
98 98
99 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ 99 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_argument_unittest.cc ('k') | base/trace_event/trace_event_etw_export_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698