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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 1746013: Make sure to check for in-progress downloads when quitting. Adds back in code... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 8 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/app_controller_mac.mm
===================================================================
--- chrome/browser/app_controller_mac.mm (revision 45803)
+++ chrome/browser/app_controller_mac.mm (working copy)
@@ -240,6 +240,14 @@
}
- (BOOL)tryToTerminateApplication:(NSApplication*)app {
+ // Check for in-process downloads, and prompt the user if they really want
+ // to quit (and thus cancel downloads). Only check if we're not already
+ // shutting down, else the user might be prompted multiple times if the
+ // download isn't stopped before terminate is called again.
+ if (!browser_shutdown::IsTryingToQuit() &&
+ ![self shouldQuitWithInProgressDownloads])
+ return NO;
+
// Set the state to "trying to quit", so that closing all browser windows will
// lead to termination.
browser_shutdown::SetTryingToQuit(true);
« 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