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

Unified Diff: cc/debug/frame_timing_tracker_unittest.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/frame_timing_tracker.cc ('k') | cc/debug/frame_viewer_instrumentation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/frame_timing_tracker_unittest.cc
diff --git a/cc/debug/frame_timing_tracker_unittest.cc b/cc/debug/frame_timing_tracker_unittest.cc
index 2bef6b451cf91987b8493dd3ce42675b2677db62..109b730dee8b0ca7ff0ff4237f29514bf36b7f21 100644
--- a/cc/debug/frame_timing_tracker_unittest.cc
+++ b/cc/debug/frame_timing_tracker_unittest.cc
@@ -21,8 +21,8 @@ namespace cc {
namespace {
std::string CompositeToString(
- scoped_ptr<FrameTimingTracker::CompositeTimingSet> timingset) {
- scoped_ptr<base::trace_event::TracedValue> value(
+ std::unique_ptr<FrameTimingTracker::CompositeTimingSet> timingset) {
+ std::unique_ptr<base::trace_event::TracedValue> value(
new base::trace_event::TracedValue());
value->BeginArray("values");
std::set<int> rect_ids;
@@ -48,8 +48,8 @@ std::string CompositeToString(
}
std::string MainFrameToString(
- scoped_ptr<FrameTimingTracker::MainFrameTimingSet> timingset) {
- scoped_ptr<base::trace_event::TracedValue> value(
+ std::unique_ptr<FrameTimingTracker::MainFrameTimingSet> timingset) {
+ std::unique_ptr<base::trace_event::TracedValue> value(
new base::trace_event::TracedValue());
value->BeginArray("values");
std::set<int> rect_ids;
@@ -82,7 +82,7 @@ TEST(FrameTimingTrackerTest, DefaultTrackerIsEmpty) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
EXPECT_EQ("{\"values\":[]}",
CompositeToString(tracker->GroupCompositeCountsByRectId()));
@@ -97,7 +97,7 @@ TEST(FrameTimingTrackerTest, NoFrameIdsIsEmpty) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
std::vector<std::pair<int, int64_t>> ids;
tracker->SaveTimeStamps(base::TimeTicks::FromInternalValue(100), ids);
@@ -112,7 +112,7 @@ TEST(FrameTimingTrackerTest, NoRectIdsYieldsNoMainFrameEvents) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
tracker->SaveMainFrameTimeStamps(std::vector<int64_t>(),
base::TimeTicks::FromInternalValue(100),
@@ -128,7 +128,7 @@ TEST(FrameTimingTrackerTest, OneFrameId) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
std::vector<std::pair<int, int64_t>> ids;
ids.push_back(std::make_pair(1, 2));
@@ -146,7 +146,7 @@ TEST(FrameTimingTrackerTest, OneMainFrameRect) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
std::vector<int64_t> rect_ids;
rect_ids.push_back(1);
@@ -166,7 +166,7 @@ TEST(FrameTimingTrackerTest, UnsortedTimestampsIds) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
std::vector<std::pair<int, int64_t>> ids;
ids.push_back(std::make_pair(1, 2));
@@ -188,7 +188,7 @@ TEST(FrameTimingTrackerTest, MainFrameUnsortedTimestamps) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
std::vector<int64_t> rect_ids;
rect_ids.push_back(2);
@@ -216,7 +216,7 @@ TEST(FrameTimingTrackerTest, MultipleFrameIds) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
std::vector<std::pair<int, int64_t>> ids200;
@@ -255,7 +255,7 @@ TEST(FrameTimingTrackerTest, MultipleMainFrameEvents) {
FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
&task_graph_runner);
- scoped_ptr<FrameTimingTracker> tracker(
+ std::unique_ptr<FrameTimingTracker> tracker(
FrameTimingTracker::Create(&host_impl));
std::vector<int64_t> rect_ids200;
« no previous file with comments | « cc/debug/frame_timing_tracker.cc ('k') | cc/debug/frame_viewer_instrumentation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698