From ab324f2466599fb0042c0e2b3244b65abff10bfe Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Thu, 11 Sep 2008 21:24:10 +0000 Subject: Avoid starting the pause timer if it is already started. R=sky Review URL: http://codereview.chromium.org/2443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2083 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/resource_dispatcher_host.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'chrome/browser/resource_dispatcher_host.cc') diff --git a/chrome/browser/resource_dispatcher_host.cc b/chrome/browser/resource_dispatcher_host.cc index adcda4c..e677027 100644 --- a/chrome/browser/resource_dispatcher_host.cc +++ b/chrome/browser/resource_dispatcher_host.cc @@ -398,8 +398,9 @@ class ResourceDispatcherHost::DownloadEventHandler private: void StartPauseTimer() { - pause_timer_.Start(TimeDelta::FromMilliseconds(kThrottleTimeMs), this, - &DownloadEventHandler::CheckWriteProgress); + if (!pause_timer_.IsRunning()) + pause_timer_.Start(TimeDelta::FromMilliseconds(kThrottleTimeMs), this, + &DownloadEventHandler::CheckWriteProgress); } int download_id_; -- cgit v1.1