| Index: chrome/browser/download/download_status_updater.cc
|
| diff --git a/chrome/browser/download/download_status_updater.cc b/chrome/browser/download/download_status_updater.cc
|
| index d06df410895ef70a4ff5cfc46b214f2454f659c1..2bbb045f70f0d6bc682ff0e36a7aff36b1db7d7e 100644
|
| --- a/chrome/browser/download/download_status_updater.cc
|
| +++ b/chrome/browser/download/download_status_updater.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/stl_util.h"
|
| +#include "chrome/browser/download/download_util.h"
|
|
|
| DownloadStatusUpdater::DownloadStatusUpdater() {
|
| }
|
| @@ -58,6 +59,8 @@ void DownloadStatusUpdater::ModelChanged(content::DownloadManager* manager) {
|
| it != downloads.end(); ++it) {
|
| UpdateItem(*it);
|
| }
|
| +
|
| + UpdateAppIconDownloadProgress();
|
| }
|
|
|
| void DownloadStatusUpdater::ManagerGoingDown(
|
| @@ -77,11 +80,21 @@ void DownloadStatusUpdater::SelectFileDialogDisplayed(
|
| void DownloadStatusUpdater::OnDownloadUpdated(
|
| content::DownloadItem* download) {
|
| UpdateItem(download);
|
| + UpdateAppIconDownloadProgress();
|
| }
|
|
|
| void DownloadStatusUpdater::OnDownloadOpened(content::DownloadItem* download) {
|
| }
|
|
|
| +void DownloadStatusUpdater::UpdateAppIconDownloadProgress() {
|
| + float progress = 0;
|
| + int download_count = 0;
|
| + bool progress_known = GetProgress(&progress, &download_count);
|
| + download_util::UpdateAppIconDownloadProgress(download_count,
|
| + progress_known,
|
| + progress);
|
| +}
|
| +
|
| // React to a transition that a download associated with one of our
|
| // download managers has made. Our goal is to have only IN_PROGRESS
|
| // items on our set list, as they're the only ones that have relevance
|
|
|