OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 //------------------------------------------------------------------------------ | 5 //------------------------------------------------------------------------------ |
6 // Tracked is the base class for all tracked objects. During construction, it | 6 // Tracked is the base class for all tracked objects. During construction, it |
7 // registers the fact that an instance was created, and at destruction time, it | 7 // registers the fact that an instance was created, and at destruction time, it |
8 // records that event. The instance may be tagged with a name, which is refered | 8 // records that event. The instance may be tagged with a name, which is refered |
9 // to as its Location. The Location is a file and line number, most | 9 // to as its Location. The Location is a file and line number, most |
10 // typically indicated where the object was constructed. In some cases, as the | 10 // typically indicated where the object was constructed. In some cases, as the |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 private: | 110 private: |
111 #ifdef TRACK_ALL_TASK_OBJECTS | 111 #ifdef TRACK_ALL_TASK_OBJECTS |
112 | 112 |
113 // Pointer to instance were counts of objects with the same birth location | 113 // Pointer to instance were counts of objects with the same birth location |
114 // (on the same thread) are stored. | 114 // (on the same thread) are stored. |
115 Births* tracked_births_; | 115 Births* tracked_births_; |
116 // The time this object was constructed. If its life consisted of a long | 116 // The time this object was constructed. If its life consisted of a long |
117 // waiting period, and then it became active, then this value is generally | 117 // waiting period, and then it became active, then this value is generally |
118 // reset before the object begins it active life. | 118 // reset before the object begins it active life. |
119 Time tracked_birth_time_; | 119 base::Time tracked_birth_time_; |
120 | 120 |
121 #endif // TRACK_ALL_TASK_OBJECTS | 121 #endif // TRACK_ALL_TASK_OBJECTS |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(Tracked); | 123 DISALLOW_COPY_AND_ASSIGN(Tracked); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace tracked_objects | 126 } // namespace tracked_objects |
127 | 127 |
128 #endif // BASE_TRACKED_H_ | 128 #endif // BASE_TRACKED_H_ |
129 | 129 |
OLD | NEW |