Index: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc |
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc |
index 39ba0d31c3fd30803a780476aaadf1def9821eea..cedcf3a8cdb6c0c1ae4fd05f32e8a89dfab2c6f2 100644 |
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc |
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc |
@@ -35,8 +35,6 @@ |
#include "chrome/browser/ui/browser_window.h" |
#include "chrome/common/pref_names.h" |
#include "chromeos/chromeos_switches.h" |
-#include "chromeos/dbus/dbus_thread_manager.h" |
-#include "chromeos/dbus/power_manager_client.h" |
#include "chromeos/ime/input_method_manager.h" |
#include "content/public/browser/notification_service.h" |
#include "content/public/browser/user_metrics.h" |
@@ -237,10 +235,8 @@ void ChromeShellDelegate::PreInit() { |
new chromeos::DisplayConfigurationObserver()); |
} |
-void ChromeShellDelegate::Shutdown() { |
- content::RecordAction(base::UserMetricsAction("Shutdown")); |
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
- RequestShutdown(); |
+void ChromeShellDelegate::PreShutdown() { |
+ display_configuration_observer_.reset(); |
} |
ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { |
@@ -285,11 +281,6 @@ void ChromeShellDelegate::Observe(int type, |
InitAfterSessionStart(); |
ash::Shell::GetInstance()->ShowShelf(); |
break; |
- case chrome::NOTIFICATION_APP_TERMINATING: |
- // Let classes unregister themselves as observers of the |
- // ash::Shell singleton before the shell is destroyed. |
- display_configuration_observer_.reset(); |
- break; |
default: |
NOTREACHED() << "Unexpected notification " << type; |
} |
@@ -302,7 +293,4 @@ void ChromeShellDelegate::PlatformInit() { |
registrar_.Add(this, |
chrome::NOTIFICATION_SESSION_STARTED, |
content::NotificationService::AllSources()); |
- registrar_.Add(this, |
- chrome::NOTIFICATION_APP_TERMINATING, |
- content::NotificationService::AllSources()); |
} |