| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 58 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 59 #include "chrome/browser/chromeos/login/startup_utils.h" | 59 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 60 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 60 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 61 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 61 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 62 #include "chrome/browser/chromeos/login/wizard_controller.h" | 62 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 63 #include "chrome/browser/chromeos/net/network_connect_delegate_chromeos.h" | 63 #include "chrome/browser/chromeos/net/network_connect_delegate_chromeos.h" |
| 64 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" | 64 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" |
| 65 #include "chrome/browser/chromeos/net/network_pref_state_observer.h" | 65 #include "chrome/browser/chromeos/net/network_pref_state_observer.h" |
| 66 #include "chrome/browser/chromeos/net/network_throttling_observer.h" | 66 #include "chrome/browser/chromeos/net/network_throttling_observer.h" |
| 67 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" | 67 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" |
| 68 #include "chrome/browser/chromeos/note_taking_helper.h" |
| 68 #include "chrome/browser/chromeos/options/cert_library.h" | 69 #include "chrome/browser/chromeos/options/cert_library.h" |
| 69 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 70 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
| 70 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 71 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 71 #include "chrome/browser/chromeos/policy/device_local_account.h" | 72 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 72 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" | 73 #include "chrome/browser/chromeos/power/freezer_cgroup_process_manager.h" |
| 73 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" | 74 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" |
| 74 #include "chrome/browser/chromeos/power/login_lock_state_notifier.h" | 75 #include "chrome/browser/chromeos/power/login_lock_state_notifier.h" |
| 75 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" | 76 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" |
| 76 #include "chrome/browser/chromeos/power/power_data_collector.h" | 77 #include "chrome/browser/chromeos/power/power_data_collector.h" |
| 77 #include "chrome/browser/chromeos/power/power_prefs.h" | 78 #include "chrome/browser/chromeos/power/power_prefs.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 new default_app_order::ExternalLoader(false /* async */)); | 480 new default_app_order::ExternalLoader(false /* async */)); |
| 480 } | 481 } |
| 481 | 482 |
| 482 if (!app_order_loader_) { | 483 if (!app_order_loader_) { |
| 483 app_order_loader_.reset( | 484 app_order_loader_.reset( |
| 484 new default_app_order::ExternalLoader(true /* async */)); | 485 new default_app_order::ExternalLoader(true /* async */)); |
| 485 } | 486 } |
| 486 | 487 |
| 487 media::SoundsManager::Create(); | 488 media::SoundsManager::Create(); |
| 488 | 489 |
| 490 NoteTakingHelper::Initialize(); |
| 491 |
| 489 AccessibilityManager::Initialize(); | 492 AccessibilityManager::Initialize(); |
| 490 | 493 |
| 491 if (!chrome::IsRunningInMash()) { | 494 if (!chrome::IsRunningInMash()) { |
| 492 // Initialize magnification manager before ash tray is created. And this | 495 // Initialize magnification manager before ash tray is created. And this |
| 493 // must be placed after UserManager::SessionStarted(); | 496 // must be placed after UserManager::SessionStarted(); |
| 494 // TODO(sad): These components expects the ash::Shell instance to be | 497 // TODO(sad): These components expects the ash::Shell instance to be |
| 495 // created. However, when running as a mus-client, an ash::Shell instance is | 498 // created. However, when running as a mus-client, an ash::Shell instance is |
| 496 // not created. These accessibility services should instead be exposed as | 499 // not created. These accessibility services should instead be exposed as |
| 497 // separate services. crbug.com/557401 | 500 // separate services. crbug.com/557401 |
| 498 MagnificationManager::Initialize(); | 501 MagnificationManager::Initialize(); |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 SystemKeyEventListener::Shutdown(); | 843 SystemKeyEventListener::Shutdown(); |
| 841 #endif | 844 #endif |
| 842 | 845 |
| 843 // Detach D-Bus clients before DBusThreadManager is shut down. | 846 // Detach D-Bus clients before DBusThreadManager is shut down. |
| 844 login_lock_state_notifier_.reset(); | 847 login_lock_state_notifier_.reset(); |
| 845 idle_action_warning_observer_.reset(); | 848 idle_action_warning_observer_.reset(); |
| 846 | 849 |
| 847 if (!chrome::IsRunningInMash()) | 850 if (!chrome::IsRunningInMash()) |
| 848 MagnificationManager::Shutdown(); | 851 MagnificationManager::Shutdown(); |
| 849 | 852 |
| 853 NoteTakingHelper::Shutdown(); |
| 854 |
| 850 media::SoundsManager::Shutdown(); | 855 media::SoundsManager::Shutdown(); |
| 851 | 856 |
| 852 system::StatisticsProvider::GetInstance()->Shutdown(); | 857 system::StatisticsProvider::GetInstance()->Shutdown(); |
| 853 | 858 |
| 854 // Let the UserManager and WallpaperManager unregister itself as an observer | 859 // Let the UserManager and WallpaperManager unregister itself as an observer |
| 855 // of the CrosSettings singleton before it is destroyed. This also ensures | 860 // of the CrosSettings singleton before it is destroyed. This also ensures |
| 856 // that the UserManager has no URLRequest pending (see | 861 // that the UserManager has no URLRequest pending (see |
| 857 // http://crbug.com/276659). | 862 // http://crbug.com/276659). |
| 858 g_browser_process->platform_part()->user_manager()->Shutdown(); | 863 g_browser_process->platform_part()->user_manager()->Shutdown(); |
| 859 WallpaperManager::Shutdown(); | 864 WallpaperManager::Shutdown(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 // Destroy DBus services immediately after threads are stopped. | 918 // Destroy DBus services immediately after threads are stopped. |
| 914 dbus_services_.reset(); | 919 dbus_services_.reset(); |
| 915 | 920 |
| 916 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 921 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 917 | 922 |
| 918 // Destroy DeviceSettingsService after g_browser_process. | 923 // Destroy DeviceSettingsService after g_browser_process. |
| 919 DeviceSettingsService::Shutdown(); | 924 DeviceSettingsService::Shutdown(); |
| 920 } | 925 } |
| 921 | 926 |
| 922 } // namespace chromeos | 927 } // namespace chromeos |
| OLD | NEW |