Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3557)

Unified Diff: chrome/browser/download/download_service.cc

Issue 26938003: Don't prompt to save malicious downloads on exit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unneeded code Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d5f1f420e0bc29b2e5b1b752652cdfcfcbbc83c2 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::NonMaliciousDownloadCount() const {
if (!download_manager_created_)
return 0;
- return BrowserContext::GetDownloadManager(profile_)->InProgressCount();
+ return BrowserContext::GetDownloadManager(profile_)->
+ NonMaliciousInProgressCount();
}
// static
-int DownloadService::DownloadCountAllProfiles() {
+int DownloadService::NonMaliciousDownloadCountAllProfiles() {
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)->
+ NonMaliciousDownloadCount();
if ((*it)->HasOffTheRecordProfile())
count += DownloadServiceFactory::GetForBrowserContext(
- (*it)->GetOffTheRecordProfile())->DownloadCount();
+ (*it)->GetOffTheRecordProfile())->NonMaliciousDownloadCount();
}
return count;
« no previous file with comments | « chrome/browser/download/download_service.h ('k') | chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698