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

Unified Diff: base/trace_event/trace_buffer.cc

Issue 1479473002: base: Use std::move() instead of Pass() for real movable types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: basepass: missing-include 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
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | base/trace_event/trace_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_buffer.cc
diff --git a/base/trace_event/trace_buffer.cc b/base/trace_event/trace_buffer.cc
index a2e4f141ef431941ea0147b3a5e015197f8496f0..eb7caa5a4a43dd5ebfb323e74277e7f39c156725 100644
--- a/base/trace_event/trace_buffer.cc
+++ b/base/trace_event/trace_buffer.cc
@@ -4,6 +4,8 @@
#include "base/trace_event/trace_buffer.h"
+#include <utility>
+
#include "base/memory/scoped_vector.h"
#include "base/trace_event/trace_event_impl.h"
@@ -105,7 +107,7 @@ class TraceBufferRingBuffer : public TraceBuffer {
TraceBufferChunk* chunk = chunks_[chunk_index];
cloned_buffer->chunks_.push_back(chunk ? chunk->Clone().release() : NULL);
}
- return cloned_buffer.Pass();
+ return std::move(cloned_buffer);
}
void EstimateTraceMemoryOverhead(
@@ -309,7 +311,7 @@ scoped_ptr<TraceBufferChunk> TraceBufferChunk::Clone() const {
cloned_chunk->next_free_ = next_free_;
for (size_t i = 0; i < next_free_; ++i)
cloned_chunk->chunk_[i].CopyFrom(chunk_[i]);
- return cloned_chunk.Pass();
+ return cloned_chunk;
}
void TraceBufferChunk::EstimateTraceMemoryOverhead(
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | base/trace_event/trace_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698