Skip to content
Snippets Groups Projects
Commit 3076fad0 authored by pinkerton@chromium.org's avatar pinkerton@chromium.org
Browse files

Make sure to check for in-progress downloads when quitting. Adds back in code

removed during quit refactoring.
BUG=41675
TEST=quit while downloading, can cancel and quit app, as well as cancel the quit to allow the download to complete. When download completes, closing all windows shouldn't quit (normal behavior).
Review URL: http://codereview.chromium.org/1746013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45832 0039d316-1c4b-4281-b951-d872f2087c98
parent 1cf63017
No related merge requests found
......@@ -240,6 +240,14 @@ void RecordLastRunAppBundlePath() {
}
- (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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment