diff options
author | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-02 06:12:36 +0000 |
---|---|---|
committer | yusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-02 06:12:36 +0000 |
commit | e9b07c642f79b058cc88f79033ba54b53655fb67 (patch) | |
tree | 28de1f517cc06b870bfd4fbed9cf6432deab65dc | |
parent | cb7defb5f3b1ea748d037150f4099b0dbdc39243 (diff) | |
download | chromium_src-e9b07c642f79b058cc88f79033ba54b53655fb67.zip chromium_src-e9b07c642f79b058cc88f79033ba54b53655fb67.tar.gz chromium_src-e9b07c642f79b058cc88f79033ba54b53655fb67.tar.bz2 |
Listen to APP_TERMINATING instead of APP_EXITING to fix the issue 11055.
BUG=chromium-os:11055
TEST=see the bug
Review URL: http://codereview.chromium.org/6368044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73431 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/cros/input_method_library.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/cros/input_method_library.cc b/chrome/browser/chromeos/cros/input_method_library.cc index e867fac..c73710f 100644 --- a/chrome/browser/chromeos/cros/input_method_library.cc +++ b/chrome/browser/chromeos/cros/input_method_library.cc @@ -72,12 +72,14 @@ class InputMethodLibraryImpl : public InputMethodLibrary, if (CrosLibrary::Get()->EnsureLoaded()) { current_input_method_id_ = chromeos::GetHardwareKeyboardLayoutName(); } - // Observe APP_EXITING to stop input method daemon gracefully. + // Observe APP_TERMINATING to stop input method daemon gracefully. + // We should not use APP_EXITING here since logout might be canceled by + // JavaScript after APP_EXITING is sent (crosbug.com/11055). // Note that even if we fail to stop input method daemon from // Chrome in case of a sudden crash, we have a way to do it from an // upstart script. See crosbug.com/6515 and crosbug.com/6995 for // details. - notification_registrar_.Add(this, NotificationType::APP_EXITING, + notification_registrar_.Add(this, NotificationType::APP_TERMINATING, NotificationService::AllSources()); } @@ -655,7 +657,8 @@ class InputMethodLibraryImpl : public InputMethodLibrary, const NotificationSource& source, const NotificationDetails& details) { // Stop the input method daemon on browser shutdown. - if (type.value == NotificationType::APP_EXITING) { + if (type.value == NotificationType::APP_TERMINATING) { + notification_registrar_.RemoveAll(); StopInputMethodDaemon(); } } |