Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 #include "chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate. h" | 38 #include "chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate. h" |
| 39 #include "chrome/browser/chromeos/dbus/chrome_display_power_service_provider_del egate.h" | 39 #include "chrome/browser/chromeos/dbus/chrome_display_power_service_provider_del egate.h" |
| 40 #include "chrome/browser/chromeos/dbus/chrome_proxy_resolver_delegate.h" | 40 #include "chrome/browser/chromeos/dbus/chrome_proxy_resolver_delegate.h" |
| 41 #include "chrome/browser/chromeos/dbus/kiosk_info_service_provider.h" | 41 #include "chrome/browser/chromeos/dbus/kiosk_info_service_provider.h" |
| 42 #include "chrome/browser/chromeos/dbus/screen_lock_service_provider.h" | 42 #include "chrome/browser/chromeos/dbus/screen_lock_service_provider.h" |
| 43 #include "chrome/browser/chromeos/display/quirks_manager_delegate_impl.h" | 43 #include "chrome/browser/chromeos/display/quirks_manager_delegate_impl.h" |
| 44 #include "chrome/browser/chromeos/events/event_rewriter.h" | 44 #include "chrome/browser/chromeos/events/event_rewriter.h" |
| 45 #include "chrome/browser/chromeos/events/event_rewriter_controller.h" | 45 #include "chrome/browser/chromeos/events/event_rewriter_controller.h" |
| 46 #include "chrome/browser/chromeos/events/keyboard_driven_event_rewriter.h" | 46 #include "chrome/browser/chromeos/events/keyboard_driven_event_rewriter.h" |
| 47 #include "chrome/browser/chromeos/extensions/default_app_order.h" | 47 #include "chrome/browser/chromeos/extensions/default_app_order.h" |
| 48 #include "chrome/browser/chromeos/extensions/extension_system_event_observer.h" | |
| 48 #include "chrome/browser/chromeos/external_metrics.h" | 49 #include "chrome/browser/chromeos/external_metrics.h" |
| 49 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 50 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
| 50 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 51 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 51 #include "chrome/browser/chromeos/language_preferences.h" | 52 #include "chrome/browser/chromeos/language_preferences.h" |
| 52 #include "chrome/browser/chromeos/login/helper.h" | 53 #include "chrome/browser/chromeos/login/helper.h" |
| 53 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 54 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 54 #include "chrome/browser/chromeos/login/login_wizard.h" | 55 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 55 #include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h" | 56 #include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h" |
| 56 #include "chrome/browser/chromeos/login/quick_unlock/pin_storage_factory.h" | 57 #include "chrome/browser/chromeos/login/quick_unlock/pin_storage_factory.h" |
| 57 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 58 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 663 bool is_running_test = parameters().ui_task != nullptr; | 664 bool is_running_test = parameters().ui_task != nullptr; |
| 664 g_browser_process->platform_part()->InitializeSessionManager( | 665 g_browser_process->platform_part()->InitializeSessionManager( |
| 665 parsed_command_line(), profile(), is_running_test); | 666 parsed_command_line(), profile(), is_running_test); |
| 666 g_browser_process->platform_part()->SessionManager()->Start(); | 667 g_browser_process->platform_part()->SessionManager()->Start(); |
| 667 | 668 |
| 668 // Guest user profile is never initialized with locale settings, | 669 // Guest user profile is never initialized with locale settings, |
| 669 // so we need special handling for Guest session. | 670 // so we need special handling for Guest session. |
| 670 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) | 671 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) |
| 671 SetGuestLocale(profile()); | 672 SetGuestLocale(profile()); |
| 672 | 673 |
| 674 // This observer uses the intialized profile to dispatch extension events. | |
| 675 extension_system_event_observer_.reset(new ExtensionSystemEventObserver()); | |
|
sky
2016/10/20 15:41:07
MakeUnique if you can.
msw
2016/10/20 16:15:32
Done here and elsewhere in this function.
| |
| 676 | |
| 673 peripheral_battery_observer_.reset(new PeripheralBatteryObserver()); | 677 peripheral_battery_observer_.reset(new PeripheralBatteryObserver()); |
| 674 | 678 |
| 675 renderer_freezer_.reset( | 679 renderer_freezer_.reset( |
| 676 new RendererFreezer(std::unique_ptr<RendererFreezer::Delegate>( | 680 new RendererFreezer(std::unique_ptr<RendererFreezer::Delegate>( |
| 677 new FreezerCgroupProcessManager()))); | 681 new FreezerCgroupProcessManager()))); |
| 678 | 682 |
| 679 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); | 683 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); |
| 680 g_browser_process->platform_part()->InitializeDeviceDisablingManager(); | 684 g_browser_process->platform_part()->InitializeDeviceDisablingManager(); |
| 681 | 685 |
| 682 // This observer cannot be created earlier because it requires the shell to be | 686 // This observer cannot be created earlier because it requires the shell to be |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 791 // depend on. | 795 // depend on. |
| 792 data_promo_notification_.reset(); | 796 data_promo_notification_.reset(); |
| 793 | 797 |
| 794 // Tell DeviceSettingsService to stop talking to session_manager. Do not | 798 // Tell DeviceSettingsService to stop talking to session_manager. Do not |
| 795 // shutdown DeviceSettingsService yet, it might still be accessed by | 799 // shutdown DeviceSettingsService yet, it might still be accessed by |
| 796 // BrowserPolicyConnector (owned by g_browser_process). | 800 // BrowserPolicyConnector (owned by g_browser_process). |
| 797 DeviceSettingsService::Get()->UnsetSessionManager(); | 801 DeviceSettingsService::Get()->UnsetSessionManager(); |
| 798 | 802 |
| 799 // We should remove observers attached to D-Bus clients before | 803 // We should remove observers attached to D-Bus clients before |
| 800 // DBusThreadManager is shut down. | 804 // DBusThreadManager is shut down. |
| 805 extension_system_event_observer_.reset(); | |
| 801 peripheral_battery_observer_.reset(); | 806 peripheral_battery_observer_.reset(); |
| 802 power_prefs_.reset(); | 807 power_prefs_.reset(); |
| 803 renderer_freezer_.reset(); | 808 renderer_freezer_.reset(); |
| 804 wake_on_wifi_manager_.reset(); | 809 wake_on_wifi_manager_.reset(); |
| 805 ScreenLocker::ShutDownClass(); | 810 ScreenLocker::ShutDownClass(); |
| 806 keyboard_event_rewriters_.reset(); | 811 keyboard_event_rewriters_.reset(); |
| 807 low_disk_notification_.reset(); | 812 low_disk_notification_.reset(); |
| 808 #if defined(USE_X11) | 813 #if defined(USE_X11) |
| 809 if (!chrome::IsRunningInMash()) { | 814 if (!chrome::IsRunningInMash()) { |
| 810 // The XInput2 event listener needs to be shut down earlier than when | 815 // The XInput2 event listener needs to be shut down earlier than when |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 889 // Destroy DBus services immediately after threads are stopped. | 894 // Destroy DBus services immediately after threads are stopped. |
| 890 dbus_services_.reset(); | 895 dbus_services_.reset(); |
| 891 | 896 |
| 892 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 897 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 893 | 898 |
| 894 // Destroy DeviceSettingsService after g_browser_process. | 899 // Destroy DeviceSettingsService after g_browser_process. |
| 895 DeviceSettingsService::Shutdown(); | 900 DeviceSettingsService::Shutdown(); |
| 896 } | 901 } |
| 897 | 902 |
| 898 } // namespace chromeos | 903 } // namespace chromeos |
| OLD | NEW |