Index: base/trace_event/trace_log.cc |
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc |
index 1da4a63779c7664f22b08f365051113ff94cc4e0..a0b12fbc5426fc1f357b4be8eb219a690ca2c647 100644 |
--- a/base/trace_event/trace_log.cc |
+++ b/base/trace_event/trace_log.cc |
@@ -6,6 +6,7 @@ |
#include <algorithm> |
#include <cmath> |
+#include <memory> |
#include <utility> |
#include "base/base_switches.h" |
@@ -16,7 +17,6 @@ |
#include "base/location.h" |
#include "base/macros.h" |
#include "base/memory/ref_counted_memory.h" |
-#include "base/memory/scoped_ptr.h" |
#include "base/memory/singleton.h" |
#include "base/process/process_metrics.h" |
#include "base/stl_util.h" |
@@ -241,7 +241,7 @@ class TraceLog::ThreadLocalEventBuffer |
// Since TraceLog is a leaky singleton, trace_log_ will always be valid |
// as long as the thread exists. |
TraceLog* trace_log_; |
- scoped_ptr<TraceBufferChunk> chunk_; |
+ std::unique_ptr<TraceBufferChunk> chunk_; |
size_t chunk_index_; |
int generation_; |
@@ -901,7 +901,7 @@ void TraceLog::FlushInternal(const TraceLog::OutputCallback& cb, |
// Usually it runs on a different thread. |
void TraceLog::ConvertTraceEventsToTraceFormat( |
- scoped_ptr<TraceBuffer> logged_events, |
+ std::unique_ptr<TraceBuffer> logged_events, |
const OutputCallback& flush_output_callback, |
const ArgumentFilterPredicate& argument_filter_predicate) { |
if (flush_output_callback.is_null()) |
@@ -927,7 +927,7 @@ void TraceLog::ConvertTraceEventsToTraceFormat( |
} |
void TraceLog::FinishFlush(int generation, bool discard_events) { |
- scoped_ptr<TraceBuffer> previous_logged_events; |
+ std::unique_ptr<TraceBuffer> previous_logged_events; |
OutputCallback flush_output_callback; |
ArgumentFilterPredicate argument_filter_predicate; |
@@ -1035,7 +1035,7 @@ TraceEventHandle TraceLog::AddTraceEvent( |
const char** arg_names, |
const unsigned char* arg_types, |
const unsigned long long* arg_values, |
- scoped_ptr<ConvertableToTraceFormat>* convertable_values, |
+ std::unique_ptr<ConvertableToTraceFormat>* convertable_values, |
unsigned int flags) { |
int thread_id = static_cast<int>(base::PlatformThread::CurrentId()); |
base::TimeTicks now = base::TimeTicks::Now(); |
@@ -1067,7 +1067,7 @@ TraceEventHandle TraceLog::AddTraceEventWithBindId( |
const char** arg_names, |
const unsigned char* arg_types, |
const unsigned long long* arg_values, |
- scoped_ptr<ConvertableToTraceFormat>* convertable_values, |
+ std::unique_ptr<ConvertableToTraceFormat>* convertable_values, |
unsigned int flags) { |
int thread_id = static_cast<int>(base::PlatformThread::CurrentId()); |
base::TimeTicks now = base::TimeTicks::Now(); |
@@ -1099,7 +1099,7 @@ TraceEventHandle TraceLog::AddTraceEventWithProcessId( |
const char** arg_names, |
const unsigned char* arg_types, |
const unsigned long long* arg_values, |
- scoped_ptr<ConvertableToTraceFormat>* convertable_values, |
+ std::unique_ptr<ConvertableToTraceFormat>* convertable_values, |
unsigned int flags) { |
base::TimeTicks now = base::TimeTicks::Now(); |
return AddTraceEventWithThreadIdAndTimestamp( |
@@ -1133,7 +1133,7 @@ TraceEventHandle TraceLog::AddTraceEventWithThreadIdAndTimestamp( |
const char** arg_names, |
const unsigned char* arg_types, |
const unsigned long long* arg_values, |
- scoped_ptr<ConvertableToTraceFormat>* convertable_values, |
+ std::unique_ptr<ConvertableToTraceFormat>* convertable_values, |
unsigned int flags) { |
return AddTraceEventWithThreadIdAndTimestamp( |
phase, |
@@ -1165,7 +1165,7 @@ TraceEventHandle TraceLog::AddTraceEventWithThreadIdAndTimestamp( |
const char** arg_names, |
const unsigned char* arg_types, |
const unsigned long long* arg_values, |
- scoped_ptr<ConvertableToTraceFormat>* convertable_values, |
+ std::unique_ptr<ConvertableToTraceFormat>* convertable_values, |
unsigned int flags) { |
TraceEventHandle handle = {0, 0, 0}; |
if (!*category_group_enabled) |
@@ -1339,9 +1339,9 @@ void TraceLog::AddMetadataEvent( |
const char** arg_names, |
const unsigned char* arg_types, |
const unsigned long long* arg_values, |
- scoped_ptr<ConvertableToTraceFormat>* convertable_values, |
+ std::unique_ptr<ConvertableToTraceFormat>* convertable_values, |
unsigned int flags) { |
- scoped_ptr<TraceEvent> trace_event(new TraceEvent); |
+ std::unique_ptr<TraceEvent> trace_event(new TraceEvent); |
int thread_id = static_cast<int>(base::PlatformThread::CurrentId()); |
ThreadTicks thread_now = ThreadNow(); |
TimeTicks now = OffsetNow(); |