1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file contains the penultimate pieces of the Mac shutdown puzzle. For
6 // an in-depth overview of the Mac shutdown path, see the comment above
7 // -[BrowserCrApplication terminate:].
9 #include "chrome/browser/lifetime/application_lifetime.h"
11 #include "base/logging.h"
12 #include "chrome/browser/browser_shutdown.h"
13 #import "chrome/browser/chrome_browser_application_mac.h"
17 // At this point, the user is trying to quit (or the system is forcing the
18 // application to quit) and all browsers have been successfully closed. The
19 // final step in shutdown is to post the NSApplicationWillTerminateNotification
20 // to end the -[NSApplication run] event loop.
21 void HandleAppExitingForPlatform() {
22 static bool kill_me_now = false;
26 [[NSNotificationCenter defaultCenter]
27 postNotificationName:NSApplicationWillTerminateNotification