diff options
Diffstat (limited to 'base/tracked.h')
-rw-r--r-- | base/tracked.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/base/tracked.h b/base/tracked.h index b0be729..3622d1c 100644 --- a/base/tracked.h +++ b/base/tracked.h @@ -107,8 +107,14 @@ class Tracked { bool MissingBirthplace() const; +#if defined(TRACK_ALL_TASK_OBJECTS) + base::TimeTicks tracked_birth_time() const { return tracked_birth_time_; } +#else + base::TimeTicks tracked_birth_time() const { return base::TimeTicks::Now(); } +#endif // defined(TRACK_ALL_TASK_OBJECTS) + private: -#ifdef TRACK_ALL_TASK_OBJECTS +#if defined(TRACK_ALL_TASK_OBJECTS) // Pointer to instance were counts of objects with the same birth location // (on the same thread) are stored. @@ -118,7 +124,7 @@ class Tracked { // reset before the object begins it active life. base::TimeTicks tracked_birth_time_; -#endif // TRACK_ALL_TASK_OBJECTS +#endif // defined(TRACK_ALL_TASK_OBJECTS) DISALLOW_COPY_AND_ASSIGN(Tracked); }; |