| Index: chrome/browser/ui/views/download/download_item_view_md.cc
|
| diff --git a/chrome/browser/ui/views/download/download_item_view_md.cc b/chrome/browser/ui/views/download/download_item_view_md.cc
|
| index 7df05cfb42edf62d50b806b82006e19b4442e62d..e5fb1fddf98338ce3a1ef6b5f4453a5d87b0ab1e 100644
|
| --- a/chrome/browser/ui/views/download/download_item_view_md.cc
|
| +++ b/chrome/browser/ui/views/download/download_item_view_md.cc
|
| @@ -199,21 +199,16 @@ DownloadItemViewMd::~DownloadItemViewMd() {
|
| // Progress animation handlers.
|
|
|
| void DownloadItemViewMd::StartDownloadProgress() {
|
| - if (progress_timer_.IsRunning())
|
| + if (progress_start_time_ != base::TimeTicks())
|
| return;
|
| progress_start_time_ = base::TimeTicks::Now();
|
| - progress_timer_.Start(
|
| - FROM_HERE,
|
| - base::TimeDelta::FromMilliseconds(DownloadShelf::kProgressRateMs),
|
| - base::Bind(&DownloadItemViewMd::SchedulePaint, base::Unretained(this)));
|
| }
|
|
|
| void DownloadItemViewMd::StopDownloadProgress() {
|
| - if (!progress_timer_.IsRunning())
|
| + if (progress_start_time_ == base::TimeTicks())
|
| return;
|
| previous_progress_elapsed_ += base::TimeTicks::Now() - progress_start_time_;
|
| progress_start_time_ = base::TimeTicks();
|
| - progress_timer_.Stop();
|
| }
|
|
|
| // static
|
| @@ -254,6 +249,7 @@ void DownloadItemViewMd::OnDownloadUpdated(DownloadItem* download_item) {
|
| case DownloadItem::IN_PROGRESS:
|
| download()->IsPaused() ? StopDownloadProgress()
|
| : StartDownloadProgress();
|
| + SchedulePaint();
|
| LoadIconIfItemPathChanged();
|
| break;
|
| case DownloadItem::INTERRUPTED:
|
| @@ -297,11 +293,6 @@ void DownloadItemViewMd::OnDownloadUpdated(DownloadItem* download_item) {
|
| }
|
|
|
| UpdateAccessibleName();
|
| -
|
| - // We use the parent's (DownloadShelfView's) SchedulePaint, since there
|
| - // are spaces between each DownloadItemViewMd that the parent is responsible
|
| - // for painting.
|
| - shelf_->SchedulePaint();
|
| }
|
|
|
| void DownloadItemViewMd::OnDownloadDestroyed(DownloadItem* download) {
|
|
|