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

Unified Diff: base/profiler/stack_sampling_profiler.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/process/process_metrics_linux.cc ('k') | base/profiler/win32_stack_frame_unwinder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/stack_sampling_profiler.cc
diff --git a/base/profiler/stack_sampling_profiler.cc b/base/profiler/stack_sampling_profiler.cc
index c7e38c0e52cb65137c8eb8d17ca807acfafd90c8..52b412d3f56e24630f19e07bd78f606218f10ae8 100644
--- a/base/profiler/stack_sampling_profiler.cc
+++ b/base/profiler/stack_sampling_profiler.cc
@@ -5,6 +5,7 @@
#include "base/profiler/stack_sampling_profiler.h"
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -113,11 +114,10 @@ StackSamplingProfiler::SamplingThread::SamplingThread(
scoped_ptr<NativeStackSampler> native_sampler,
const SamplingParams& params,
const CompletedCallback& completed_callback)
- : native_sampler_(native_sampler.Pass()),
+ : native_sampler_(std::move(native_sampler)),
params_(params),
stop_event_(false, false),
- completed_callback_(completed_callback) {
-}
+ completed_callback_(completed_callback) {}
StackSamplingProfiler::SamplingThread::~SamplingThread() {}
@@ -256,8 +256,8 @@ void StackSamplingProfiler::Start() {
if (!native_sampler)
return;
- sampling_thread_.reset(
- new SamplingThread(native_sampler.Pass(), params_, completed_callback_));
+ sampling_thread_.reset(new SamplingThread(std::move(native_sampler), params_,
+ completed_callback_));
if (!PlatformThread::Create(0, sampling_thread_.get(),
&sampling_thread_handle_))
sampling_thread_.reset();
« no previous file with comments | « base/process/process_metrics_linux.cc ('k') | base/profiler/win32_stack_frame_unwinder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698