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

Unified Diff: cc/debug/micro_benchmark.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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 | « cc/debug/micro_benchmark.h ('k') | cc/debug/micro_benchmark_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/micro_benchmark.cc
diff --git a/cc/debug/micro_benchmark.cc b/cc/debug/micro_benchmark.cc
index 8077718c8611eccf0b60941f63dbd58b833ee073..72d3c7dea3128e52b3294b952d0773f0e0c38c16 100644
--- a/cc/debug/micro_benchmark.cc
+++ b/cc/debug/micro_benchmark.cc
@@ -4,9 +4,11 @@
#include "cc/debug/micro_benchmark.h"
+#include <memory>
+
#include "base/callback.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/values.h"
#include "cc/debug/micro_benchmark_impl.h"
@@ -28,7 +30,7 @@ bool MicroBenchmark::IsDone() const {
void MicroBenchmark::DidUpdateLayers(LayerTreeHost* host) {}
-void MicroBenchmark::NotifyDone(scoped_ptr<base::Value> result) {
+void MicroBenchmark::NotifyDone(std::unique_ptr<base::Value> result) {
callback_.Run(std::move(result));
is_done_ = true;
}
@@ -37,7 +39,7 @@ void MicroBenchmark::RunOnLayer(Layer* layer) {}
void MicroBenchmark::RunOnLayer(PictureLayer* layer) {}
-bool MicroBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
+bool MicroBenchmark::ProcessMessage(std::unique_ptr<base::Value> value) {
return false;
}
@@ -45,16 +47,16 @@ bool MicroBenchmark::ProcessedForBenchmarkImpl() const {
return processed_for_benchmark_impl_;
}
-scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::GetBenchmarkImpl(
+std::unique_ptr<MicroBenchmarkImpl> MicroBenchmark::GetBenchmarkImpl(
scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
DCHECK(!processed_for_benchmark_impl_);
processed_for_benchmark_impl_ = true;
return CreateBenchmarkImpl(origin_task_runner);
}
-scoped_ptr<MicroBenchmarkImpl> MicroBenchmark::CreateBenchmarkImpl(
+std::unique_ptr<MicroBenchmarkImpl> MicroBenchmark::CreateBenchmarkImpl(
scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
- return make_scoped_ptr<MicroBenchmarkImpl>(nullptr);
+ return base::WrapUnique<MicroBenchmarkImpl>(nullptr);
}
} // namespace cc
« no previous file with comments | « cc/debug/micro_benchmark.h ('k') | cc/debug/micro_benchmark_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698