summaryrefslogtreecommitdiffstats
path: root/base/tracked.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 21:20:41 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 21:20:41 +0000
commit9cfb89a8002a2fc6b0ea3fd4eccb33b6f4dd464a (patch)
treed30b49f072edfbdb4c812a0b34dc825c936dccbf /base/tracked.h
parent5d028b7b577d2efb96cd958ba4a7f1e5800fd9bb (diff)
downloadchromium_src-9cfb89a8002a2fc6b0ea3fd4eccb33b6f4dd464a.zip
chromium_src-9cfb89a8002a2fc6b0ea3fd4eccb33b6f4dd464a.tar.gz
chromium_src-9cfb89a8002a2fc6b0ea3fd4eccb33b6f4dd464a.tar.bz2
Reland r49188.
It was reverted due to breaking a valgrind test which has since been disabled. Review URL: http://codereview.chromium.org/2763004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tracked.h')
-rw-r--r--base/tracked.h10
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);
};