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

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

Issue 19209002: Fix Download In Progress prompt on browser close (regression) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r212340 Created 7 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 2d49f99f7f3975e911f5218064eb4c2adf9c3c2f..f792db76bbe8b092b841974b45ed2c60496f5fca 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -679,9 +679,6 @@ Browser::DownloadClosePreventionType Browser::OkToCloseWithInProgressDownloads(
DCHECK(num_downloads_blocking);
*num_downloads_blocking = 0;
- if (IsAttemptingToCloseBrowser())
- return DOWNLOAD_CLOSE_OK;
-
// If we're not running a full browser process with a profile manager
// (testing), it's ok to close the browser.
if (!g_browser_process->profile_manager())
@@ -720,7 +717,8 @@ Browser::DownloadClosePreventionType Browser::OkToCloseWithInProgressDownloads(
// those downloads would be cancelled by our window (-> profile) close.
DownloadService* download_service =
DownloadServiceFactory::GetForProfile(profile());
- if (profile_window_count == 0 && download_service->DownloadCount() > 0 &&
+ if ((profile_window_count == 0) &&
+ (download_service->DownloadCount() > 0) &&
profile()->IsOffTheRecord()) {
*num_downloads_blocking = download_service->DownloadCount();
return DOWNLOAD_CLOSE_LAST_WINDOW_IN_INCOGNITO_PROFILE;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698