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

Unified Diff: base/profiler/stack_sampling_profiler.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/profiler/stack_sampling_profiler.h ('k') | base/profiler/stack_sampling_profiler_unittest.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 0749ae5a320c2c998ed0e2aabe1dcb188817be05..2ece50908e6e3865aa28e84b3756a91af1442435 100644
--- a/base/profiler/stack_sampling_profiler.cc
+++ b/base/profiler/stack_sampling_profiler.cc
@@ -42,12 +42,12 @@ class AsyncRunner {
// Runs the callback and deletes the AsyncRunner instance.
static void RunCallbackAndDeleteInstance(
- scoped_ptr<AsyncRunner> object_to_be_deleted,
+ std::unique_ptr<AsyncRunner> object_to_be_deleted,
const StackSamplingProfiler::CompletedCallback& callback,
scoped_refptr<SingleThreadTaskRunner> task_runner,
const StackSamplingProfiler::CallStackProfiles& profiles);
- scoped_ptr<StackSamplingProfiler> profiler_;
+ std::unique_ptr<StackSamplingProfiler> profiler_;
DISALLOW_COPY_AND_ASSIGN(AsyncRunner);
};
@@ -57,7 +57,7 @@ void AsyncRunner::Run(
PlatformThreadId thread_id,
const StackSamplingProfiler::SamplingParams& params,
const StackSamplingProfiler::CompletedCallback &callback) {
- scoped_ptr<AsyncRunner> runner(new AsyncRunner);
+ std::unique_ptr<AsyncRunner> runner(new AsyncRunner);
AsyncRunner* temp_ptr = runner.get();
temp_ptr->profiler_.reset(
new StackSamplingProfiler(thread_id, params,
@@ -72,7 +72,7 @@ void AsyncRunner::Run(
AsyncRunner::AsyncRunner() {}
void AsyncRunner::RunCallbackAndDeleteInstance(
- scoped_ptr<AsyncRunner> object_to_be_deleted,
+ std::unique_ptr<AsyncRunner> object_to_be_deleted,
const StackSamplingProfiler::CompletedCallback& callback,
scoped_refptr<SingleThreadTaskRunner> task_runner,
const StackSamplingProfiler::CallStackProfiles& profiles) {
@@ -115,7 +115,7 @@ StackSamplingProfiler::CallStackProfile::~CallStackProfile() {}
// StackSamplingProfiler::SamplingThread --------------------------------------
StackSamplingProfiler::SamplingThread::SamplingThread(
- scoped_ptr<NativeStackSampler> native_sampler,
+ std::unique_ptr<NativeStackSampler> native_sampler,
const SamplingParams& params,
const CompletedCallback& completed_callback)
: native_sampler_(std::move(native_sampler)),
@@ -255,7 +255,7 @@ void StackSamplingProfiler::Start() {
if (completed_callback_.is_null())
return;
- scoped_ptr<NativeStackSampler> native_sampler =
+ std::unique_ptr<NativeStackSampler> native_sampler =
NativeStackSampler::Create(thread_id_, test_delegate_);
if (!native_sampler)
return;
« no previous file with comments | « base/profiler/stack_sampling_profiler.h ('k') | base/profiler/stack_sampling_profiler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698