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

Side by Side Diff: base/trace_event/trace_event_etw_export_win.cc

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
« no previous file with comments | « base/trace_event/trace_event_etw_export_win.h ('k') | base/trace_event/trace_event_impl.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 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 #include "base/trace_event/trace_event_etw_export_win.h" 5 #include "base/trace_event/trace_event_etw_export_win.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // static 230 // static
231 void TraceEventETWExport::AddEvent( 231 void TraceEventETWExport::AddEvent(
232 char phase, 232 char phase,
233 const unsigned char* category_group_enabled, 233 const unsigned char* category_group_enabled,
234 const char* name, 234 const char* name,
235 unsigned long long id, 235 unsigned long long id,
236 int num_args, 236 int num_args,
237 const char** arg_names, 237 const char** arg_names,
238 const unsigned char* arg_types, 238 const unsigned char* arg_types,
239 const unsigned long long* arg_values, 239 const unsigned long long* arg_values,
240 const scoped_ptr<ConvertableToTraceFormat>* convertable_values) { 240 const std::unique_ptr<ConvertableToTraceFormat>* convertable_values) {
241 // We bail early in case exporting is disabled or no consumer is listening. 241 // We bail early in case exporting is disabled or no consumer is listening.
242 auto* instance = GetInstance(); 242 auto* instance = GetInstance();
243 if (!instance || !instance->etw_export_enabled_ || !EventEnabledChromeEvent()) 243 if (!instance || !instance->etw_export_enabled_ || !EventEnabledChromeEvent())
244 return; 244 return;
245 245
246 const char* phase_string = nullptr; 246 const char* phase_string = nullptr;
247 // Space to store the phase identifier and null-terminator, when needed. 247 // Space to store the phase identifier and null-terminator, when needed.
248 char phase_buffer[2]; 248 char phase_buffer[2];
249 switch (phase) { 249 switch (phase) {
250 case TRACE_EVENT_PHASE_BEGIN: 250 case TRACE_EVENT_PHASE_BEGIN:
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // static 429 // static
430 void TraceEventETWExport::UpdateETWKeyword() { 430 void TraceEventETWExport::UpdateETWKeyword() {
431 if (!IsETWExportEnabled()) 431 if (!IsETWExportEnabled())
432 return; 432 return;
433 auto* instance = GetInstance(); 433 auto* instance = GetInstance();
434 DCHECK(instance); 434 DCHECK(instance);
435 instance->UpdateEnabledCategories(); 435 instance->UpdateEnabledCategories();
436 } 436 }
437 } // namespace trace_event 437 } // namespace trace_event
438 } // namespace base 438 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_etw_export_win.h ('k') | base/trace_event/trace_event_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698