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

Unified Diff: chrome/browser/js_modal_dialog_mac.mm

Issue 1520006: Mac: reform our shutdown routine. (Closed)
Patch Set: changed comment 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 | « chrome/browser/chrome_browser_application_mac.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/js_modal_dialog_mac.mm
diff --git a/chrome/browser/js_modal_dialog_mac.mm b/chrome/browser/js_modal_dialog_mac.mm
index 3bdc9aa1828de48044dec47b7dc7967ea43b66cd..d15e6ad8ccbd46f64c468805ef5e298683990c7e 100644
--- a/chrome/browser/js_modal_dialog_mac.mm
+++ b/chrome/browser/js_modal_dialog_mac.mm
@@ -10,6 +10,7 @@
#include "app/message_box_flags.h"
#import "base/cocoa_protocols_mac.h"
#include "base/sys_string_conversions.h"
+#import "chrome/browser/chrome_browser_application_mac.h"
#include "grit/app_strings.h"
#include "grit/generated_resources.h"
@@ -68,6 +69,11 @@
break;
}
case NSAlertSecondButtonReturn: { // Cancel
+ // If the user wants to stay on this page, stop quitting (if a quit is in
+ // progress).
+ if (bridge->is_before_unload_dialog())
+ chrome_browser_application_mac::CancelTerminate();
+
bridge->OnCancel();
break;
}
« no previous file with comments | « chrome/browser/chrome_browser_application_mac.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698