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

Side by Side Diff: base/tracked_objects_unittest.cc

Issue 804533005: Standardize usage of virtual/override/final specifiers in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 years 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
« no previous file with comments | « base/time/time_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Test of classes in the tracked_objects.h classes. 5 // Test of classes in the tracked_objects.h classes.
6 6
7 #include "base/tracked_objects.h" 7 #include "base/tracked_objects.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 16 matching lines...) Expand all
27 TrackedObjectsTest() { 27 TrackedObjectsTest() {
28 // On entry, leak any database structures in case they are still in use by 28 // On entry, leak any database structures in case they are still in use by
29 // prior threads. 29 // prior threads.
30 ThreadData::ShutdownSingleThreadedCleanup(true); 30 ThreadData::ShutdownSingleThreadedCleanup(true);
31 31
32 test_time_ = 0; 32 test_time_ = 0;
33 ThreadData::SetAlternateTimeSource(&TrackedObjectsTest::GetTestTime); 33 ThreadData::SetAlternateTimeSource(&TrackedObjectsTest::GetTestTime);
34 ThreadData::now_function_is_time_ = true; 34 ThreadData::now_function_is_time_ = true;
35 } 35 }
36 36
37 virtual ~TrackedObjectsTest() { 37 ~TrackedObjectsTest() override {
38 // We should not need to leak any structures we create, since we are 38 // We should not need to leak any structures we create, since we are
39 // single threaded, and carefully accounting for items. 39 // single threaded, and carefully accounting for items.
40 ThreadData::ShutdownSingleThreadedCleanup(false); 40 ThreadData::ShutdownSingleThreadedCleanup(false);
41 } 41 }
42 42
43 // Reset the profiler state. 43 // Reset the profiler state.
44 void Reset() { 44 void Reset() {
45 ThreadData::ShutdownSingleThreadedCleanup(false); 45 ThreadData::ShutdownSingleThreadedCleanup(false);
46 test_time_ = 0; 46 test_time_ = 0;
47 } 47 }
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 EXPECT_EQ(2, process_data.tasks[t1].death_data.run_duration_sample); 821 EXPECT_EQ(2, process_data.tasks[t1].death_data.run_duration_sample);
822 EXPECT_EQ(1, process_data.tasks[t1].death_data.queue_duration_sum); 822 EXPECT_EQ(1, process_data.tasks[t1].death_data.queue_duration_sum);
823 EXPECT_EQ(1, process_data.tasks[t1].death_data.queue_duration_max); 823 EXPECT_EQ(1, process_data.tasks[t1].death_data.queue_duration_max);
824 EXPECT_EQ(1, process_data.tasks[t1].death_data.queue_duration_sample); 824 EXPECT_EQ(1, process_data.tasks[t1].death_data.queue_duration_sample);
825 EXPECT_EQ(kMainThreadName, process_data.tasks[t1].death_thread_name); 825 EXPECT_EQ(kMainThreadName, process_data.tasks[t1].death_thread_name);
826 EXPECT_EQ(0u, process_data.descendants.size()); 826 EXPECT_EQ(0u, process_data.descendants.size());
827 EXPECT_EQ(base::GetCurrentProcId(), process_data.process_id); 827 EXPECT_EQ(base::GetCurrentProcId(), process_data.process_id);
828 } 828 }
829 829
830 } // namespace tracked_objects 830 } // namespace tracked_objects
OLDNEW
« no previous file with comments | « base/time/time_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698