diff options
author | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 00:45:33 +0000 |
---|---|---|
committer | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 00:45:33 +0000 |
commit | 02798a98ff76ed7f21c446dfb76e9d46f561d5cf (patch) | |
tree | 8446dcbb05cf2630a715fe84e517f477f2f99546 /content/renderer/load_progress_tracker.cc | |
parent | 1d7382f2c7d71448dc1c2292ff104b814f1308ec (diff) | |
download | chromium_src-02798a98ff76ed7f21c446dfb76e9d46f561d5cf.zip chromium_src-02798a98ff76ed7f21c446dfb76e9d46f561d5cf.tar.gz chromium_src-02798a98ff76ed7f21c446dfb76e9d46f561d5cf.tar.bz2 |
Convert use of int ms to TimeDelta in files owned by brettw.
BUG=108171
TEST=
Review URL: http://codereview.chromium.org/9233018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/load_progress_tracker.cc')
-rw-r--r-- | content/renderer/load_progress_tracker.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/content/renderer/load_progress_tracker.cc b/content/renderer/load_progress_tracker.cc index cc153f6..b7a14ba 100644 --- a/content/renderer/load_progress_tracker.cc +++ b/content/renderer/load_progress_tracker.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -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() { |