| 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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 #include "chromeos/system/statistics_provider.h" | 111 #include "chromeos/system/statistics_provider.h" |
| 112 #include "chromeos/tpm/tpm_token_loader.h" | 112 #include "chromeos/tpm/tpm_token_loader.h" |
| 113 #include "components/metrics/metrics_service.h" | 113 #include "components/metrics/metrics_service.h" |
| 114 #include "components/ownership/owner_key_util.h" | 114 #include "components/ownership/owner_key_util.h" |
| 115 #include "components/session_manager/core/session_manager.h" | 115 #include "components/session_manager/core/session_manager.h" |
| 116 #include "components/user_manager/user.h" | 116 #include "components/user_manager/user.h" |
| 117 #include "components/user_manager/user_manager.h" | 117 #include "components/user_manager/user_manager.h" |
| 118 #include "content/public/browser/browser_thread.h" | 118 #include "content/public/browser/browser_thread.h" |
| 119 #include "content/public/browser/notification_service.h" | 119 #include "content/public/browser/notification_service.h" |
| 120 #include "content/public/common/main_function_params.h" | 120 #include "content/public/common/main_function_params.h" |
| 121 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 121 #include "media/audio/sounds/sounds_manager.h" | 122 #include "media/audio/sounds/sounds_manager.h" |
| 122 #include "net/base/network_change_notifier.h" | 123 #include "net/base/network_change_notifier.h" |
| 123 #include "net/socket/ssl_server_socket.h" | 124 #include "net/socket/ssl_server_socket.h" |
| 124 #include "net/url_request/url_request.h" | 125 #include "net/url_request/url_request.h" |
| 125 #include "net/url_request/url_request_context_getter.h" | 126 #include "net/url_request/url_request_context_getter.h" |
| 126 #include "ui/base/ime/chromeos/ime_keyboard.h" | 127 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 127 #include "ui/base/ime/chromeos/input_method_manager.h" | 128 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 128 #include "ui/base/touch/touch_device.h" | 129 #include "ui/base/touch/touch_device.h" |
| 129 #include "ui/events/event_utils.h" | 130 #include "ui/events/event_utils.h" |
| 130 | 131 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // g_browser_process initializes BrowserPolicyConnector. | 222 // g_browser_process initializes BrowserPolicyConnector. |
| 222 DeviceSettingsService::Initialize(); | 223 DeviceSettingsService::Initialize(); |
| 223 DeviceSettingsService::Get()->SetSessionManager( | 224 DeviceSettingsService::Get()->SetSessionManager( |
| 224 DBusThreadManager::Get()->GetSessionManagerClient(), | 225 DBusThreadManager::Get()->GetSessionManagerClient(), |
| 225 OwnerSettingsServiceChromeOSFactory::GetInstance()->GetOwnerKeyUtil()); | 226 OwnerSettingsServiceChromeOSFactory::GetInstance()->GetOwnerKeyUtil()); |
| 226 } | 227 } |
| 227 | 228 |
| 228 ~DBusServices() { | 229 ~DBusServices() { |
| 229 ui::NetworkConnect::Shutdown(); | 230 ui::NetworkConnect::Shutdown(); |
| 230 network_connect_delegate_.reset(); | 231 network_connect_delegate_.reset(); |
| 231 | |
| 232 CertLibrary::Shutdown(); | 232 CertLibrary::Shutdown(); |
| 233 NetworkHandler::Shutdown(); | 233 NetworkHandler::Shutdown(); |
| 234 | |
| 235 cryptohome::AsyncMethodCaller::Shutdown(); | 234 cryptohome::AsyncMethodCaller::Shutdown(); |
| 236 disks::DiskMountManager::Shutdown(); | 235 disks::DiskMountManager::Shutdown(); |
| 237 | |
| 238 SystemSaltGetter::Shutdown(); | 236 SystemSaltGetter::Shutdown(); |
| 239 LoginState::Shutdown(); | 237 LoginState::Shutdown(); |
| 240 CertLoader::Shutdown(); | 238 CertLoader::Shutdown(); |
| 241 TPMTokenLoader::Shutdown(); | 239 TPMTokenLoader::Shutdown(); |
| 242 | |
| 243 CrosDBusService::Shutdown(); | 240 CrosDBusService::Shutdown(); |
| 244 | |
| 245 // Shutdown the PowerDataCollector before shutting down DBusThreadManager. | |
| 246 PowerDataCollector::Shutdown(); | 241 PowerDataCollector::Shutdown(); |
| 247 | |
| 248 PowerPolicyController::Shutdown(); | 242 PowerPolicyController::Shutdown(); |
| 243 device::BluetoothAdapterFactory::OnDBusThreadManagerShutdown(); |
| 249 | 244 |
| 250 // NOTE: This must only be called if Initialize() was called. | 245 // NOTE: This must only be called if Initialize() was called. |
| 251 DBusThreadManager::Shutdown(); | 246 DBusThreadManager::Shutdown(); |
| 252 } | 247 } |
| 253 | 248 |
| 254 private: | 249 private: |
| 255 scoped_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_; | 250 scoped_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_; |
| 256 | 251 |
| 257 DISALLOW_COPY_AND_ASSIGN(DBusServices); | 252 DISALLOW_COPY_AND_ASSIGN(DBusServices); |
| 258 }; | 253 }; |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 // Destroy DBus services immediately after threads are stopped. | 792 // Destroy DBus services immediately after threads are stopped. |
| 798 dbus_services_.reset(); | 793 dbus_services_.reset(); |
| 799 | 794 |
| 800 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 795 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 801 | 796 |
| 802 // Destroy DeviceSettingsService after g_browser_process. | 797 // Destroy DeviceSettingsService after g_browser_process. |
| 803 DeviceSettingsService::Shutdown(); | 798 DeviceSettingsService::Shutdown(); |
| 804 } | 799 } |
| 805 | 800 |
| 806 } // namespace chromeos | 801 } // namespace chromeos |
| OLD | NEW |