| Index: chrome/browser/download/download_service.cc
|
| diff --git a/chrome/browser/download/download_service.cc b/chrome/browser/download/download_service.cc
|
| index bb75459fb55504643bbf55575fedfc6a179d689b..bf7eb37886676489cf651d352d5b61e98cfbe4a9 100644
|
| --- a/chrome/browser/download/download_service.cc
|
| +++ b/chrome/browser/download/download_service.cc
|
| @@ -88,24 +88,26 @@ bool DownloadService::HasCreatedDownloadManager() {
|
| return download_manager_created_;
|
| }
|
|
|
| -int DownloadService::DownloadCount() const {
|
| +int DownloadService::NonDangerousDownloadCount() const {
|
| if (!download_manager_created_)
|
| return 0;
|
| - return BrowserContext::GetDownloadManager(profile_)->InProgressCount();
|
| + return BrowserContext::GetDownloadManager(profile_)->
|
| + NonDangerousInProgressCount();
|
| }
|
|
|
| // static
|
| -int DownloadService::DownloadCountAllProfiles() {
|
| +int DownloadService::NonDangerousDownloadCountAllProfiles() {
|
| std::vector<Profile*> profiles(
|
| g_browser_process->profile_manager()->GetLoadedProfiles());
|
|
|
| int count = 0;
|
| for (std::vector<Profile*>::iterator it = profiles.begin();
|
| it < profiles.end(); ++it) {
|
| - count += DownloadServiceFactory::GetForBrowserContext(*it)->DownloadCount();
|
| + count += DownloadServiceFactory::GetForBrowserContext(*it)->
|
| + NonDangerousDownloadCount();
|
| if ((*it)->HasOffTheRecordProfile())
|
| count += DownloadServiceFactory::GetForBrowserContext(
|
| - (*it)->GetOffTheRecordProfile())->DownloadCount();
|
| + (*it)->GetOffTheRecordProfile())->NonDangerousDownloadCount();
|
| }
|
|
|
| return count;
|
|
|