| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 #include "chromeos/disks/disk_mount_manager.h" | 112 #include "chromeos/disks/disk_mount_manager.h" |
| 113 #include "chromeos/login/login_state.h" | 113 #include "chromeos/login/login_state.h" |
| 114 #include "chromeos/login/user_names.h" | 114 #include "chromeos/login/user_names.h" |
| 115 #include "chromeos/login_event_recorder.h" | 115 #include "chromeos/login_event_recorder.h" |
| 116 #include "chromeos/network/network_change_notifier_chromeos.h" | 116 #include "chromeos/network/network_change_notifier_chromeos.h" |
| 117 #include "chromeos/network/network_change_notifier_factory_chromeos.h" | 117 #include "chromeos/network/network_change_notifier_factory_chromeos.h" |
| 118 #include "chromeos/network/network_handler.h" | 118 #include "chromeos/network/network_handler.h" |
| 119 #include "chromeos/network/portal_detector/network_portal_detector_stub.h" | 119 #include "chromeos/network/portal_detector/network_portal_detector_stub.h" |
| 120 #include "chromeos/system/statistics_provider.h" | 120 #include "chromeos/system/statistics_provider.h" |
| 121 #include "chromeos/tpm/tpm_token_loader.h" | 121 #include "chromeos/tpm/tpm_token_loader.h" |
| 122 #include "components/arc/arc_bridge_service.h" | |
| 123 #include "components/arc/arc_service_manager.h" | |
| 124 #include "components/browser_sync/common/browser_sync_switches.h" | 122 #include "components/browser_sync/common/browser_sync_switches.h" |
| 125 #include "components/device_event_log/device_event_log.h" | 123 #include "components/device_event_log/device_event_log.h" |
| 126 #include "components/metrics/metrics_service.h" | 124 #include "components/metrics/metrics_service.h" |
| 127 #include "components/ownership/owner_key_util.h" | 125 #include "components/ownership/owner_key_util.h" |
| 128 #include "components/prefs/pref_service.h" | 126 #include "components/prefs/pref_service.h" |
| 129 #include "components/session_manager/core/session_manager.h" | 127 #include "components/session_manager/core/session_manager.h" |
| 130 #include "components/signin/core/account_id/account_id.h" | 128 #include "components/signin/core/account_id/account_id.h" |
| 131 #include "components/user_manager/user.h" | 129 #include "components/user_manager/user.h" |
| 132 #include "components/user_manager/user_manager.h" | 130 #include "components/user_manager/user_manager.h" |
| 133 #include "components/wallpaper/wallpaper_manager_base.h" | 131 #include "components/wallpaper/wallpaper_manager_base.h" |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 new RendererFreezer(std::unique_ptr<RendererFreezer::Delegate>( | 669 new RendererFreezer(std::unique_ptr<RendererFreezer::Delegate>( |
| 672 new FreezerCgroupProcessManager()))); | 670 new FreezerCgroupProcessManager()))); |
| 673 | 671 |
| 674 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); | 672 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); |
| 675 g_browser_process->platform_part()->InitializeDeviceDisablingManager(); | 673 g_browser_process->platform_part()->InitializeDeviceDisablingManager(); |
| 676 | 674 |
| 677 // This observer cannot be created earlier because it requires the shell to be | 675 // This observer cannot be created earlier because it requires the shell to be |
| 678 // available. | 676 // available. |
| 679 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); | 677 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); |
| 680 | 678 |
| 681 // Tell the window manager observer to monitor window manager changes. To do | |
| 682 // so, the ash::shell needs to be available (which it is now). | |
| 683 if (arc::ArcBridgeService::GetEnabled( | |
| 684 base::CommandLine::ForCurrentProcess())) { | |
| 685 DCHECK(arc::ArcServiceManager::Get()); | |
| 686 arc::ArcServiceManager::Get()->OnAshStarted(); | |
| 687 } | |
| 688 | |
| 689 // Start watching for low disk space events to notify the user. | 679 // Start watching for low disk space events to notify the user. |
| 690 low_disk_notification_.reset(new LowDiskNotification()); | 680 low_disk_notification_.reset(new LowDiskNotification()); |
| 691 | 681 |
| 692 ChromeBrowserMainPartsLinux::PostProfileInit(); | 682 ChromeBrowserMainPartsLinux::PostProfileInit(); |
| 693 } | 683 } |
| 694 | 684 |
| 695 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { | 685 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { |
| 696 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 686 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 697 // -- just before MetricsService::LogNeedForCleanShutdown(). | 687 // -- just before MetricsService::LogNeedForCleanShutdown(). |
| 698 | 688 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 // Destroy DBus services immediately after threads are stopped. | 874 // Destroy DBus services immediately after threads are stopped. |
| 885 dbus_services_.reset(); | 875 dbus_services_.reset(); |
| 886 | 876 |
| 887 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 877 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 888 | 878 |
| 889 // Destroy DeviceSettingsService after g_browser_process. | 879 // Destroy DeviceSettingsService after g_browser_process. |
| 890 DeviceSettingsService::Shutdown(); | 880 DeviceSettingsService::Shutdown(); |
| 891 } | 881 } |
| 892 | 882 |
| 893 } // namespace chromeos | 883 } // namespace chromeos |
| OLD | NEW |