From 3bc6ced32ae6e4ae294cb23fd179cb1084e9a0bb Mon Sep 17 00:00:00 2001 From: mitchelljones Date: Thu, 18 Dec 2014 21:01:37 -0800 Subject: Added flag --enable-hosted-app-quit-notification. Displays a notification for quitting Chrome with hosted apps running in the background on Mac. Currently, quitting Chrome will close all associated hosted app windows. BUG=442176 Review URL: https://codereview.chromium.org/801233002 Cr-Commit-Position: refs/heads/master@{#309150} --- chrome/browser/app_controller_mac.mm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chrome/browser/app_controller_mac.mm') diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index e86c79c..32e82339 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -430,6 +430,11 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { // sessions. if (!browser_shutdown::IsTryingToQuit() && quitWithAppsController_.get() && !quitWithAppsController_->ShouldQuit()) { + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kHostedAppQuitNotification)) { + return NO; + } + content::NotificationService::current()->Notify( chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, content::NotificationService::AllSources(), -- cgit v1.1