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

Unified Diff: base/tracking_info.h

Issue 846663002: Use ThreadData::Now() for TrackingInfo::time_posted initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary expectation Created 5 years, 11 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/tracked_objects_unittest.cc ('k') | base/tracking_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracking_info.h
diff --git a/base/tracking_info.h b/base/tracking_info.h
index a1c6392d2eac73432bfbd4dc299db83bc83ea46a..6c3bcd1a51471fa3c7b4e023691b03e95cda38ea 100644
--- a/base/tracking_info.h
+++ b/base/tracking_info.h
@@ -36,15 +36,18 @@ struct BASE_EXPORT TrackingInfo {
// unserviced, after they *could* be serviced. This is the same stat as we
// have for non-delayed tasks, and we consistently call it queuing delay.
tracked_objects::TrackedTime EffectiveTimePosted() const {
- return tracked_objects::TrackedTime(
- delayed_run_time.is_null() ? time_posted : delayed_run_time);
+ return delayed_run_time.is_null()
+ ? time_posted
+ : tracked_objects::TrackedTime(delayed_run_time);
}
// Record of location and thread that the task came from.
tracked_objects::Births* birth_tally;
- // Time when the related task was posted.
- base::TimeTicks time_posted;
+ // Time when the related task was posted. Note that this value may be empty
+ // if task profiling is disabled, and should only be used in conjunction with
+ // profiling-related reporting.
+ tracked_objects::TrackedTime time_posted;
// The time when the task should be run.
base::TimeTicks delayed_run_time;
« no previous file with comments | « base/tracked_objects_unittest.cc ('k') | base/tracking_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698