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

Unified Diff: cc/debug/unittest_only_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/unittest_only_benchmark.h ('k') | cc/input/input_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/unittest_only_benchmark.cc
diff --git a/cc/debug/unittest_only_benchmark.cc b/cc/debug/unittest_only_benchmark.cc
index 657c0f618d53f2b421fa43902ecf13c5b7d94c85..251507bafe711e2ad783af17fe04aff7464550ff 100644
--- a/cc/debug/unittest_only_benchmark.cc
+++ b/cc/debug/unittest_only_benchmark.cc
@@ -5,13 +5,14 @@
#include "cc/debug/unittest_only_benchmark.h"
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/values.h"
#include "cc/debug/unittest_only_benchmark_impl.h"
namespace cc {
-UnittestOnlyBenchmark::UnittestOnlyBenchmark(scoped_ptr<base::Value> value,
+UnittestOnlyBenchmark::UnittestOnlyBenchmark(std::unique_ptr<base::Value> value,
const DoneCallback& callback)
: MicroBenchmark(callback),
create_impl_benchmark_(false),
@@ -36,7 +37,7 @@ void UnittestOnlyBenchmark::DidUpdateLayers(LayerTreeHost* host) {
NotifyDone(nullptr);
}
-bool UnittestOnlyBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
+bool UnittestOnlyBenchmark::ProcessMessage(std::unique_ptr<base::Value> value) {
base::DictionaryValue* message = nullptr;
value->GetAsDictionary(&message);
bool can_handle;
@@ -48,16 +49,17 @@ bool UnittestOnlyBenchmark::ProcessMessage(scoped_ptr<base::Value> value) {
return false;
}
-void UnittestOnlyBenchmark::RecordImplResults(scoped_ptr<base::Value> results) {
+void UnittestOnlyBenchmark::RecordImplResults(
+ std::unique_ptr<base::Value> results) {
NotifyDone(std::move(results));
}
-scoped_ptr<MicroBenchmarkImpl> UnittestOnlyBenchmark::CreateBenchmarkImpl(
+std::unique_ptr<MicroBenchmarkImpl> UnittestOnlyBenchmark::CreateBenchmarkImpl(
scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
if (!create_impl_benchmark_)
- return make_scoped_ptr<MicroBenchmarkImpl>(nullptr);
+ return base::WrapUnique<MicroBenchmarkImpl>(nullptr);
- return make_scoped_ptr(new UnittestOnlyBenchmarkImpl(
+ return base::WrapUnique(new UnittestOnlyBenchmarkImpl(
origin_task_runner, nullptr,
base::Bind(&UnittestOnlyBenchmark::RecordImplResults,
weak_ptr_factory_.GetWeakPtr())));
« no previous file with comments | « cc/debug/unittest_only_benchmark.h ('k') | cc/input/input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698