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

Side by Side Diff: components/metrics/profiler/tracking_synchronizer_unittest.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/metrics/profiler/tracking_synchronizer.h" 5 #include "components/metrics/profiler/tracking_synchronizer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 using TrackingSynchronizer::SendData; 113 using TrackingSynchronizer::SendData;
114 114
115 private: 115 private:
116 ~TestTrackingSynchronizer() override {} 116 ~TestTrackingSynchronizer() override {}
117 }; 117 };
118 118
119 } // namespace 119 } // namespace
120 120
121 TEST(TrackingSynchronizerTest, ProfilerData) { 121 TEST(TrackingSynchronizerTest, ProfilerData) {
122 // Testing how TrackingSynchronizer reports 2 phases of profiling. 122 // Testing how TrackingSynchronizer reports 2 phases of profiling.
123 auto clock = new base::SimpleTestTickClock(); // Will be owned by 123 auto* clock = new base::SimpleTestTickClock(); // Will be owned by
124 // |tracking_synchronizer|. 124 // |tracking_synchronizer|.
125 clock->Advance(base::TimeDelta::FromMilliseconds(111)); 125 clock->Advance(base::TimeDelta::FromMilliseconds(111));
126 126
127 scoped_refptr<TestTrackingSynchronizer> tracking_synchronizer = 127 scoped_refptr<TestTrackingSynchronizer> tracking_synchronizer =
128 new TestTrackingSynchronizer(base::WrapUnique(clock)); 128 new TestTrackingSynchronizer(base::WrapUnique(clock));
129 129
130 clock->Advance(base::TimeDelta::FromMilliseconds(222)); 130 clock->Advance(base::TimeDelta::FromMilliseconds(222));
131 131
132 tracking_synchronizer->RegisterPhaseCompletion( 132 tracking_synchronizer->RegisterPhaseCompletion(
133 ProfilerEventProto::EVENT_FIRST_NONEMPTY_PAINT); 133 ProfilerEventProto::EVENT_FIRST_NONEMPTY_PAINT);
134 134
(...skipping 11 matching lines...) Expand all
146 profiler_data.process_id = 239; 146 profiler_data.process_id = 239;
147 147
148 clock->Advance(base::TimeDelta::FromMilliseconds(444)); 148 clock->Advance(base::TimeDelta::FromMilliseconds(444));
149 TestObserver test_observer; 149 TestObserver test_observer;
150 tracking_synchronizer->SendData( 150 tracking_synchronizer->SendData(
151 profiler_data, ProfilerEventProto::TrackedObject::PPAPI_PLUGIN, 151 profiler_data, ProfilerEventProto::TrackedObject::PPAPI_PLUGIN,
152 &test_observer); 152 &test_observer);
153 } 153 }
154 154
155 } // namespace metrics 155 } // namespace metrics
OLDNEW
« no previous file with comments | « components/memory_coordinator/browser/memory_coordinator.cc ('k') | components/ntp_snippets/ntp_snippet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698