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; |