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

Unified Diff: cc/debug/rasterize_and_record_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/rasterize_and_record_benchmark.h ('k') | cc/debug/rasterize_and_record_benchmark_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/rasterize_and_record_benchmark.cc
diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc
index 3c7058f0f09c42d3bd6f165232a6078b2e35fd57..fcd294693be36a855c18eb41a19c917e4eae6b65 100644
--- a/cc/debug/rasterize_and_record_benchmark.cc
+++ b/cc/debug/rasterize_and_record_benchmark.cc
@@ -10,6 +10,7 @@
#include <limits>
#include <string>
+#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "cc/debug/lap_timer.h"
@@ -47,7 +48,7 @@ const char* kModeSuffixes[RecordingSource::RECORDING_MODE_COUNT] = {
} // namespace
RasterizeAndRecordBenchmark::RasterizeAndRecordBenchmark(
- scoped_ptr<base::Value> value,
+ std::unique_ptr<base::Value> value,
const MicroBenchmark::DoneCallback& callback)
: MicroBenchmark(callback),
record_repeat_count_(kDefaultRecordRepeatCount),
@@ -75,7 +76,7 @@ void RasterizeAndRecordBenchmark::DidUpdateLayers(LayerTreeHost* host) {
CallFunctionLayerType::ALL_LAYERS);
DCHECK(!results_.get());
- results_ = make_scoped_ptr(new base::DictionaryValue);
+ results_ = base::WrapUnique(new base::DictionaryValue);
results_->SetInteger("pixels_recorded", record_results_.pixels_recorded);
results_->SetInteger("picture_memory_usage",
static_cast<int>(record_results_.bytes_used));
@@ -89,7 +90,7 @@ void RasterizeAndRecordBenchmark::DidUpdateLayers(LayerTreeHost* host) {
}
void RasterizeAndRecordBenchmark::RecordRasterResults(
- scoped_ptr<base::Value> results_value) {
+ std::unique_ptr<base::Value> results_value) {
DCHECK(main_thread_benchmark_done_);
base::DictionaryValue* results = nullptr;
@@ -101,9 +102,10 @@ void RasterizeAndRecordBenchmark::RecordRasterResults(
NotifyDone(std::move(results_));
}
-scoped_ptr<MicroBenchmarkImpl> RasterizeAndRecordBenchmark::CreateBenchmarkImpl(
+std::unique_ptr<MicroBenchmarkImpl>
+RasterizeAndRecordBenchmark::CreateBenchmarkImpl(
scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner) {
- return make_scoped_ptr(new RasterizeAndRecordBenchmarkImpl(
+ return base::WrapUnique(new RasterizeAndRecordBenchmarkImpl(
origin_task_runner, settings_.get(),
base::Bind(&RasterizeAndRecordBenchmark::RecordRasterResults,
weak_ptr_factory_.GetWeakPtr())));
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.h ('k') | cc/debug/rasterize_and_record_benchmark_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698