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 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "ash/ash_switches.h" | 12 #include "ash/ash_switches.h" |
13 #include "ash/shell.h" | 13 #include "ash/shell.h" |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/files/file_util.h" | 17 #include "base/files/file_util.h" |
18 #include "base/lazy_instance.h" | 18 #include "base/lazy_instance.h" |
19 #include "base/linux_util.h" | 19 #include "base/linux_util.h" |
20 #include "base/macros.h" | 20 #include "base/macros.h" |
21 #include "base/path_service.h" | 21 #include "base/path_service.h" |
22 #include "base/prefs/pref_service.h" | 22 #include "base/prefs/pref_service.h" |
23 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
24 #include "base/strings/string_split.h" | 24 #include "base/strings/string_split.h" |
25 #include "base/sys_info.h" | 25 #include "base/sys_info.h" |
26 #include "base/task_runner_util.h" | 26 #include "base/task_runner_util.h" |
27 #include "chrome/browser/browser_process.h" | 27 #include "chrome/browser/browser_process.h" |
28 #include "chrome/browser/browser_process_impl.h" | |
28 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 29 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
29 #include "chrome/browser/chrome_notification_types.h" | 30 #include "chrome/browser/chrome_notification_types.h" |
30 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 31 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
31 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 32 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
32 #include "chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h " | 33 #include "chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h " |
33 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" | 34 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" |
34 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 35 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
35 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h" | 36 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h" |
36 #include "chrome/browser/chromeos/arc/arc_settings_bridge_impl.h" | 37 #include "chrome/browser/chromeos/arc/arc_settings_bridge_impl.h" |
37 #include "chrome/browser/chromeos/boot_times_recorder.h" | 38 #include "chrome/browser/chromeos/boot_times_recorder.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 #include "chrome/browser/chromeos/power/power_prefs.h" | 70 #include "chrome/browser/chromeos/power/power_prefs.h" |
70 #include "chrome/browser/chromeos/power/renderer_freezer.h" | 71 #include "chrome/browser/chromeos/power/renderer_freezer.h" |
71 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 72 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
72 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" | 73 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" |
73 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " | 74 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " |
74 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 75 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
75 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 76 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
76 #include "chrome/browser/chromeos/system/input_device_settings.h" | 77 #include "chrome/browser/chromeos/system/input_device_settings.h" |
77 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 78 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
78 #include "chrome/browser/defaults.h" | 79 #include "chrome/browser/defaults.h" |
80 #include "chrome/browser/io_thread.h" | |
79 #include "chrome/browser/lifetime/application_lifetime.h" | 81 #include "chrome/browser/lifetime/application_lifetime.h" |
80 #include "chrome/browser/net/chrome_network_delegate.h" | 82 #include "chrome/browser/net/chrome_network_delegate.h" |
81 #include "chrome/browser/profiles/profile.h" | 83 #include "chrome/browser/profiles/profile.h" |
82 #include "chrome/browser/profiles/profile_manager.h" | 84 #include "chrome/browser/profiles/profile_manager.h" |
83 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" | 85 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" |
84 #include "chrome/common/channel_info.h" | 86 #include "chrome/common/channel_info.h" |
85 #include "chrome/common/chrome_constants.h" | 87 #include "chrome/common/chrome_constants.h" |
86 #include "chrome/common/chrome_paths.h" | 88 #include "chrome/common/chrome_paths.h" |
87 #include "chrome/common/chrome_switches.h" | 89 #include "chrome/common/chrome_switches.h" |
88 #include "chrome/common/logging_chrome.h" | 90 #include "chrome/common/logging_chrome.h" |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
816 // executed after execution of chrome::CloseAsh(), because some | 818 // executed after execution of chrome::CloseAsh(), because some |
817 // parts of WebUI depends on NetworkPortalDetector. | 819 // parts of WebUI depends on NetworkPortalDetector. |
818 network_portal_detector::Shutdown(); | 820 network_portal_detector::Shutdown(); |
819 | 821 |
820 g_browser_process->platform_part()->DestroyChromeUserManager(); | 822 g_browser_process->platform_part()->DestroyChromeUserManager(); |
821 | 823 |
822 g_browser_process->platform_part()->ShutdownSessionManager(); | 824 g_browser_process->platform_part()->ShutdownSessionManager(); |
823 } | 825 } |
824 | 826 |
825 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { | 827 void ChromeBrowserMainPartsChromeos::PostDestroyThreads() { |
828 // Destroy the ProxyConfigServiceImpl owned by IOThread before | |
sky
2016/01/05 23:17:11
This just documents the code. Document why this or
stevenjb
2016/01/06 00:43:04
Clarified.
| |
829 // shutting down NetworkHandler. | |
830 browser_process()->io_thread()->ShutdownPrefProxyConfigTracker(); | |
sky
2016/01/05 23:17:11
Won't this mean you're destroying the PrefProxyCon
stevenjb
2016/01/06 00:43:04
No, it is created in IOThread() which is (somewhat
sky
2016/01/06 16:30:37
I'm nervous and not familiar enough with this code
| |
831 | |
826 // Destroy DBus services immediately after threads are stopped. | 832 // Destroy DBus services immediately after threads are stopped. |
827 dbus_services_.reset(); | 833 dbus_services_.reset(); |
828 | 834 |
829 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 835 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
830 | 836 |
831 // Destroy DeviceSettingsService after g_browser_process. | 837 // Destroy DeviceSettingsService after g_browser_process. |
832 DeviceSettingsService::Shutdown(); | 838 DeviceSettingsService::Shutdown(); |
833 } | 839 } |
834 | 840 |
835 } // namespace chromeos | 841 } // namespace chromeos |
OLD | NEW |