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

Unified Diff: base/tracked.h

Issue 2098020: Jankometer: Generalize the code more. Add better support for monitoring IO thread. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Address darin's comments. Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_pump_win.cc ('k') | chrome/browser/jankometer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracked.h
diff --git a/base/tracked.h b/base/tracked.h
index b0be729a9d172eca0fc76e5d75c79720ca89c148..3622d1ca9e1bda65a3eb0819b245851b1d9c3841 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);
};
« no previous file with comments | « base/message_pump_win.cc ('k') | chrome/browser/jankometer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698