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

Unified Diff: chrome/browser/ui/browser.cc

Issue 26938003: Don't prompt to save malicious downloads on exit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test compile error 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/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 419b2b440bed48b5a7b156bdb9a0317f85a4c0f3..a4b4f7bb1a605b6a401a0be26ce904006a1ab6b9 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -697,7 +697,8 @@ Browser::DownloadClosePreventionType Browser::OkToCloseWithInProgressDownloads(
if (!g_browser_process->profile_manager())
return DOWNLOAD_CLOSE_OK;
- int total_download_count = DownloadService::DownloadCountAllProfiles();
+ int total_download_count =
+ DownloadService::NonDangerousDownloadCountAllProfiles();
if (total_download_count == 0)
return DOWNLOAD_CLOSE_OK; // No downloads; can definitely close.
@@ -733,7 +734,7 @@ Browser::DownloadClosePreventionType Browser::OkToCloseWithInProgressDownloads(
if ((profile_window_count == 0) &&
(download_service->DownloadCount() > 0) &&
profile()->IsOffTheRecord()) {
- *num_downloads_blocking = download_service->DownloadCount();
+ *num_downloads_blocking = download_service->NonDangerousDownloadCount();
return DOWNLOAD_CLOSE_LAST_WINDOW_IN_INCOGNITO_PROFILE;
}

Powered by Google App Engine
This is Rietveld 408576698