summaryrefslogtreecommitdiffstats
path: root/sync/sessions/nudge_tracker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/sessions/nudge_tracker.cc')
-rw-r--r--sync/sessions/nudge_tracker.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/sync/sessions/nudge_tracker.cc b/sync/sessions/nudge_tracker.cc
index 212500a..b69d753 100644
--- a/sync/sessions/nudge_tracker.cc
+++ b/sync/sessions/nudge_tracker.cc
@@ -192,11 +192,9 @@ bool NudgeTracker::IsTypeThrottled(ModelType type) const {
base::TimeDelta NudgeTracker::GetTimeUntilNextUnthrottle(
base::TimeTicks now) const {
DCHECK(IsAnyTypeThrottled()) << "This function requires a pending unthrottle";
- const base::TimeDelta kMaxTimeDelta =
- base::TimeDelta::FromInternalValue(kint64max);
// Return min of GetTimeUntilUnthrottle() values for all IsThrottled() types.
- base::TimeDelta time_until_next_unthrottle = kMaxTimeDelta;
+ base::TimeDelta time_until_next_unthrottle = base::TimeDelta::Max();
for (TypeTrackerMap::const_iterator it = type_trackers_.begin();
it != type_trackers_.end(); ++it) {
if (it->second.IsThrottled()) {
@@ -205,7 +203,7 @@ base::TimeDelta NudgeTracker::GetTimeUntilNextUnthrottle(
it->second.GetTimeUntilUnthrottle(now));
}
}
- DCHECK(kMaxTimeDelta != time_until_next_unthrottle);
+ DCHECK(!time_until_next_unthrottle.is_max());
return time_until_next_unthrottle;
}