OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
318 // is initialized first becuase some of its libraries depend on DBus | 318 // is initialized first becuase some of its libraries depend on DBus |
319 // clients. | 319 // clients. |
320 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. | 320 // TODO(hashimoto): Resolve this situation by removing CrosLibrary. |
321 // (crosbug.com/26160) | 321 // (crosbug.com/26160) |
322 if (cros_initialized_ && CrosLibrary::Get()) | 322 if (cros_initialized_ && CrosLibrary::Get()) |
323 CrosLibrary::Shutdown(); | 323 CrosLibrary::Shutdown(); |
324 | 324 |
325 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); | 325 chromeos::ManagedNetworkConfigurationHandler::Shutdown(); |
326 chromeos::NetworkConfigurationHandler::Shutdown(); | 326 chromeos::NetworkConfigurationHandler::Shutdown(); |
327 | 327 |
328 chromeos::ConnectivityStateHelper::Shutdown(); | |
329 chromeos::NetworkStateHandler::Shutdown(); | 328 chromeos::NetworkStateHandler::Shutdown(); |
330 chromeos::GeolocationHandler::Shutdown(); | 329 chromeos::GeolocationHandler::Shutdown(); |
331 chromeos::network_event_log::Shutdown(); | 330 chromeos::network_event_log::Shutdown(); |
332 | 331 |
333 cryptohome::AsyncMethodCaller::Shutdown(); | 332 cryptohome::AsyncMethodCaller::Shutdown(); |
334 disks::DiskMountManager::Shutdown(); | 333 disks::DiskMountManager::Shutdown(); |
335 input_method::Shutdown(); | 334 input_method::Shutdown(); |
336 CrosDBusService::Shutdown(); | 335 CrosDBusService::Shutdown(); |
337 // NOTE: This must only be called if Initialize() was called. | 336 // NOTE: This must only be called if Initialize() was called. |
338 DBusThreadManager::Shutdown(); | 337 DBusThreadManager::Shutdown(); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
715 | 714 |
716 // The XInput2 event listener needs to be shut down earlier than when | 715 // The XInput2 event listener needs to be shut down earlier than when |
717 // Singletons are finally destroyed in AtExitManager. | 716 // Singletons are finally destroyed in AtExitManager. |
718 XInputHierarchyChangedEventListener::GetInstance()->Stop(); | 717 XInputHierarchyChangedEventListener::GetInstance()->Stop(); |
719 | 718 |
720 // chromeos::SystemKeyEventListener::Shutdown() is always safe to call, | 719 // chromeos::SystemKeyEventListener::Shutdown() is always safe to call, |
721 // even if Initialize() wasn't called. | 720 // even if Initialize() wasn't called. |
722 SystemKeyEventListener::Shutdown(); | 721 SystemKeyEventListener::Shutdown(); |
723 imageburner::BurnManager::Shutdown(); | 722 imageburner::BurnManager::Shutdown(); |
724 AudioHandler::Shutdown(); | 723 AudioHandler::Shutdown(); |
724 // ConnectivityStateHelper needs to unregister itself as the observer | |
725 // of NetworkLibrary/NetworkStateHandler before DBusServices is shut down. | |
726 chromeos::ConnectivityStateHelper::Shutdown(); | |
stevenjb
2013/03/14 00:10:47
It would be nice if this could be initialized at t
gauravsh
2013/03/14 01:06:11
We initialize ConnectivityStateHelper in PreMainMe
stevenjb
2013/03/14 01:40:56
Ah, right, good old about_flags, forgot about that
| |
725 | 727 |
726 WebSocketProxyController::Shutdown(); | 728 WebSocketProxyController::Shutdown(); |
727 | 729 |
728 // Let classes unregister themselves as observers of the ash::Shell singleton | 730 // Let classes unregister themselves as observers of the ash::Shell singleton |
729 // before the shell is destroyed. | 731 // before the shell is destroyed. |
730 user_activity_notifier_.reset(); | 732 user_activity_notifier_.reset(); |
731 video_activity_notifier_.reset(); | 733 video_activity_notifier_.reset(); |
732 primary_display_switch_observer_.reset(); | 734 primary_display_switch_observer_.reset(); |
733 | 735 |
734 // Detach D-Bus clients before DBusThreadManager is shut down. | 736 // Detach D-Bus clients before DBusThreadManager is shut down. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
851 return; | 853 return; |
852 | 854 |
853 // If failed to launch, go back to login screen. | 855 // If failed to launch, go back to login screen. |
854 LOG(ERROR) << "Failed to launch kiosk app. Fall back to login screen"; | 856 LOG(ERROR) << "Failed to launch kiosk app. Fall back to login screen"; |
855 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); | 857 OptionallyRunChromeOSLoginManager(parsed_command_line(), profile()); |
856 | 858 |
857 // TODO(xiyuan): Show error message. | 859 // TODO(xiyuan): Show error message. |
858 } | 860 } |
859 | 861 |
860 } // namespace chromeos | 862 } // namespace chromeos |
OLD | NEW |