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

Unified Diff: base/trace_event/trace_log.cc

Issue 1465433002: Remove ScopedVector from trace_log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« base/trace_event/trace_log.h ('K') | « base/trace_event/trace_log.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_log.cc
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc
index 31dda00a37e40135ff51b65e3e710e3264111054..286e3136174b3c117b3a0d05b87a5846000ef453 100644
--- a/base/trace_event/trace_log.cc
+++ b/base/trace_event/trace_log.cc
@@ -1388,7 +1388,7 @@ void TraceLog::AddMetadataEvent(
trace_event_internal::kNoId, // bind_id
num_args, arg_names, arg_types, arg_values, convertable_values, flags);
AutoLock lock(lock_);
- metadata_events_.push_back(trace_event.Pass());
+ metadata_events_.push_back(std::move(trace_event));
}
// May be called when a COMPELETE event ends and the unfinished event has been
@@ -1529,7 +1529,7 @@ void TraceLog::AddMetadataEventsWhileLocked() {
lock_.AssertAcquired();
// Copy metadata added by |AddMetadataEvent| into the trace log.
- for (TraceEvent* event : metadata_events_)
+ for (scoped_ptr<TraceEvent>& event : metadata_events_)
Primiano Tucci (use gerrit) 2015/11/26 15:49:14 +const at this point?
AddEventToThreadSharedChunkWhileLocked(nullptr, false)->CopyFrom(*event);
#if !defined(OS_NACL) // NaCl shouldn't expose the process id.
« base/trace_event/trace_log.h ('K') | « base/trace_event/trace_log.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698