summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-09 23:33:19 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-09 23:33:19 +0000
commit9eaf0bac5e352ef93d7722d02d13e684446b3ad1 (patch)
tree148b510814c6387847bb6414000dbd0fb7d6e318 /chrome/browser
parentcfee77b14ffaaa57961b19c293b8cfe0659b5386 (diff)
downloadchromium_src-9eaf0bac5e352ef93d7722d02d13e684446b3ad1.zip
chromium_src-9eaf0bac5e352ef93d7722d02d13e684446b3ad1.tar.gz
chromium_src-9eaf0bac5e352ef93d7722d02d13e684446b3ad1.tar.bz2
Fix APP_TERMINATING on Mac to fire while the UI loop is still alive.
BUG=34391 Review URL: http://codereview.chromium.org/748002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_main_mac.mm4
-rw-r--r--chrome/browser/browser_shutdown.cc8
2 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm
index 4c97059..7163618 100644
--- a/chrome/browser/browser_main_mac.mm
+++ b/chrome/browser/browser_main_mac.mm
@@ -18,6 +18,7 @@
#import "chrome/browser/cocoa/keystone_glue.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/common/main_function_params.h"
+#include "chrome/common/notification_service.h"
#include "chrome/common/result_codes.h"
namespace Platform {
@@ -60,6 +61,9 @@ void WillInitializeMainMessageLoop(const MainFunctionParams& parameters) {
void DidEndMainMessageLoop() {
AppController* appController = [NSApp delegate];
[appController didEndMainMessageLoop];
+ NotificationService::current()->Notify(NotificationType::APP_TERMINATING,
+ NotificationService::AllSources(),
+ NotificationService::NoDetails());
}
void RecordBreakpadStatusUMA(MetricsService* metrics) {
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 50342e1..a3adf82 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -25,7 +25,6 @@
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/chrome_plugin_lib.h"
#include "net/dns_global.h"
@@ -46,7 +45,7 @@ int shutdown_num_processes_slow_;
bool delete_resources_on_shutdown = true;
-const char* const kShutdownMsFile = "chrome_shutdown_ms.txt";
+const char kShutdownMsFile[] = "chrome_shutdown_ms.txt";
void RegisterPrefs(PrefService* local_state) {
local_state->RegisterIntegerPref(prefs::kShutdownType, NOT_VALID);
@@ -91,11 +90,6 @@ FilePath GetShutdownMsPath() {
#endif
void Shutdown() {
-#if defined(OS_MACOSX)
- NotificationService::current()->Notify(NotificationType::APP_TERMINATING,
- NotificationService::AllSources(),
- NotificationService::NoDetails());
-#endif
// Unload plugins. This needs to happen on the IO thread.
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,