Index: content/renderer/load_progress_tracker.cc |
diff --git a/content/renderer/load_progress_tracker.cc b/content/renderer/load_progress_tracker.cc |
index cc153f6e8761e2c34b3d1d81481407fb612a2a00..9a462052cc0255208655a2559d773b2a05d30283 100644 |
--- a/content/renderer/load_progress_tracker.cc |
+++ b/content/renderer/load_progress_tracker.cc |
@@ -51,9 +51,11 @@ void LoadProgressTracker::DidChangeLoadProgress(WebKit::WebFrame* frame, |
// last updates. Also, since the message loop may be pretty busy when a page |
// is loaded, it might not execute a posted task in a timely manner so we make |
// sure to immediately send progress report if enough time has passed. |
+ base::TimeDelta min_delay = |
+ base::TimeDelta::FromMilliseconds(kMinimumDelayBetweenUpdatesMS); |
if (progress == 1.0 || last_time_progress_sent_.is_null() || |
- (base::TimeTicks::Now() - last_time_progress_sent_).InMilliseconds() > |
- kMinimumDelayBetweenUpdatesMS) { |
+ base::TimeTicks::Now() - last_time_progress_sent_ > |
+ min_delay) { |
// If there is a pending task to send progress, it is now obsolete. |
weak_factory_.InvalidateWeakPtrs(); |
SendChangeLoadProgress(); |
@@ -69,7 +71,7 @@ void LoadProgressTracker::DidChangeLoadProgress(WebKit::WebFrame* frame, |
FROM_HERE, |
base::Bind(&LoadProgressTracker::SendChangeLoadProgress, |
weak_factory_.GetWeakPtr()), |
- kMinimumDelayBetweenUpdatesMS); |
+ min_delay); |
} |
void LoadProgressTracker::SendChangeLoadProgress() { |