This source file includes following definitions.
- ChromeOSVersionCallback
- OnLoginFailure
- OnLoginSuccess
- OnProfilePrepared
- ShouldAutoLaunchKioskApp
- RunAutoLaunchKioskApp
- OptionallyRunChromeOSLoginManager
- PreEarlyInitialization
- PreMainMessageLoopStart
- PostMainMessageLoopStart
- PreMainMessageLoopRun
- PreProfileInit
- SetGuestLocale
- PostProfileInit
- PreBrowserStart
- PostBrowserStart
- PostMainMessageLoopRun
- PostDestroyThreads
#include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
#include <string>
#include <vector>
#include "ash/ash_switches.h"
#include "ash/shell.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/lazy_instance.h"
#include "base/linux_util.h"
#include "base/path_service.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/sys_info.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part_chromeos.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
#include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification.h"
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/dbus/cros_dbus_service.h"
#include "chrome/browser/chromeos/events/event_rewriter.h"
#include "chrome/browser/chromeos/events/system_key_event_listener.h"
#include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener.h"
#include "chrome/browser/chromeos/extensions/default_app_order.h"
#include "chrome/browser/chromeos/extensions/extension_system_event_observer.h"
#include "chrome/browser/chromeos/external_metrics.h"
#include "chrome/browser/chromeos/imageburner/burn_manager.h"
#include "chrome/browser/chromeos/input_method/input_method_configuration.h"
#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h"
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h"
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
#include "chrome/browser/chromeos/language_preferences.h"
#include "chrome/browser/chromeos/login/authenticator.h"
#include "chrome/browser/chromeos/login/login_utils.h"
#include "chrome/browser/chromeos/login/login_wizard.h"
#include "chrome/browser/chromeos/login/screen_locker.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/login/wallpaper_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/memory/oom_priority_manager.h"
#include "chrome/browser/chromeos/net/network_portal_detector.h"
#include "chrome/browser/chromeos/options/cert_library.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/power/idle_action_warning_observer.h"
#include "chrome/browser/chromeos/power/peripheral_battery_observer.h"
#include "chrome/browser/chromeos/power/power_button_observer.h"
#include "chrome/browser/chromeos/power/power_data_collector.h"
#include "chrome/browser/chromeos/power/power_prefs.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h"
#include "chrome/browser/chromeos/settings/device_settings_service.h"
#include "chrome/browser/chromeos/settings/owner_key_util.h"
#include "chrome/browser/chromeos/status/data_promo_notification.h"
#include "chrome/browser/chromeos/system/input_device_settings.h"
#include "chrome/browser/chromeos/upgrade_detector_chromeos.h"
#include "chrome/browser/defaults.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/rlz/rlz.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h"
#include "chromeos/audio/audio_devices_pref_handler.h"
#include "chromeos/audio/cras_audio_handler.h"
#include "chromeos/cert_loader.h"
#include "chromeos/chromeos_paths.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/async_method_caller.h"
#include "chromeos/cryptohome/homedir_methods.h"
#include "chromeos/cryptohome/system_salt_getter.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_policy_controller.h"
#include "chromeos/dbus/session_manager_client.h"
#include "chromeos/disks/disk_mount_manager.h"
#include "chromeos/ime/input_method_manager.h"
#include "chromeos/ime/xkeyboard.h"
#include "chromeos/login/login_state.h"
#include "chromeos/network/network_change_notifier_chromeos.h"
#include "chromeos/network/network_change_notifier_factory_chromeos.h"
#include "chromeos/network/network_handler.h"
#include "chromeos/system/statistics_provider.h"
#include "chromeos/tpm_token_loader.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/power_save_blocker.h"
#include "content/public/common/main_function_params.h"
#include "grit/platform_locale_settings.h"
#include "media/audio/sounds/sounds_manager.h"
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context_getter.h"
#include "ui/base/touch/touch_device.h"
#include "ui/events/event_utils.h"
#if defined(USE_X11)
#include "chrome/browser/chromeos/device_uma.h"
#endif
namespace chromeos {
namespace {
void ChromeOSVersionCallback(const std::string& version) {
base::SetLinuxDistro(std::string("CrOS ") + version);
}
class StubLogin : public LoginStatusConsumer,
public LoginUtils::Delegate {
public:
StubLogin(std::string username, std::string password)
: profile_prepared_(false) {
authenticator_ = LoginUtils::Get()->CreateAuthenticator(this);
authenticator_.get()->AuthenticateToLogin(
ProfileHelper::GetSigninProfile(),
UserContext(username, password, std::string() ));
}
virtual ~StubLogin() {
LoginUtils::Get()->DelegateDeleted(this);
}
virtual void OnLoginFailure(const LoginFailure& error) OVERRIDE {
LOG(ERROR) << "Login Failure: " << error.GetErrorString();
delete this;
}
virtual void OnLoginSuccess(const UserContext& user_context) OVERRIDE {
if (!profile_prepared_) {
LoginUtils::Get()->PrepareProfile(user_context,
std::string(),
false,
true,
this);
} else {
delete this;
}
}
virtual void OnProfilePrepared(Profile* profile) OVERRIDE {
std::string login_user =
CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
chromeos::switches::kLoginUser);
profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername, login_user);
profile_prepared_ = true;
LoginUtils::Get()->DoBrowserLaunch(profile, NULL);
delete this;
}
scoped_refptr<Authenticator> authenticator_;
bool profile_prepared_;
};
bool ShouldAutoLaunchKioskApp(const CommandLine& command_line) {
KioskAppManager* app_manager = KioskAppManager::Get();
return command_line.HasSwitch(switches::kLoginManager) &&
!command_line.HasSwitch(switches::kForceLoginManagerInTests) &&
app_manager->IsAutoLaunchEnabled() &&
KioskAppLaunchError::Get() == KioskAppLaunchError::NONE;
}
void RunAutoLaunchKioskApp() {
ShowLoginWizard(chromeos::WizardController::kAppLaunchSplashScreenName);
VLOG(1) << "Kiosk app auto launch >> login-prompt-visible";
DBusThreadManager::Get()->GetSessionManagerClient()->
EmitLoginPromptVisible();
}
void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line,
Profile* profile) {
if (ShouldAutoLaunchKioskApp(parsed_command_line)) {
RunAutoLaunchKioskApp();
} else if (parsed_command_line.HasSwitch(switches::kLoginManager)) {
const std::string first_screen =
parsed_command_line.HasSwitch(switches::kLoginScreen) ?
WizardController::kLoginScreenName : std::string();
ShowLoginWizard(first_screen);
if (KioskModeSettings::Get()->IsKioskModeEnabled())
InitializeKioskModeScreensaver();
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
if (!connector->IsEnterpriseManaged()) {
PrefService* local_state = g_browser_process->local_state();
local_state->ClearPref(prefs::kRebootAfterUpdate);
}
} else if (parsed_command_line.HasSwitch(switches::kLoginUser) &&
parsed_command_line.HasSwitch(switches::kLoginPassword)) {
BootTimesLoader::Get()->RecordLoginAttempted();
new StubLogin(
parsed_command_line.GetSwitchValueASCII(switches::kLoginUser),
parsed_command_line.GetSwitchValueASCII(switches::kLoginPassword));
} else {
if (!parsed_command_line.HasSwitch(::switches::kTestName)) {
if (chromeos::CrasAudioHandler::IsInitialized())
chromeos::CrasAudioHandler::Get()->LogErrors();
LoginUtils::Get()->RestoreAuthenticationSession(profile);
}
}
}
}
namespace internal {
class DBusServices {
public:
explicit DBusServices(const content::MainFunctionParams& parameters) {
if (!base::SysInfo::IsRunningOnChromeOS()) {
base::FilePath user_data_dir;
if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
PathService::Override(chromeos::DIR_USER_POLICY_KEYS,
user_data_dir.AppendASCII("stub_user_policy"));
}
}
DBusThreadManager::Initialize();
CrosDBusService::Initialize();
PowerDataCollector::Initialize();
LoginState::Initialize();
SystemSaltGetter::Initialize();
TPMTokenLoader::Initialize();
CertLoader::Initialize();
chromeos::input_method::Initialize(
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::UI),
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::FILE));
disks::DiskMountManager::Initialize();
cryptohome::AsyncMethodCaller::Initialize();
cryptohome::HomedirMethods::Initialize();
NetworkHandler::Initialize();
CertLibrary::Initialize();
NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize();
UpgradeDetectorChromeos::GetInstance()->Init();
if (base::SysInfo::IsRunningOnChromeOS()) {
input_method::InputMethodManager::Get()->GetXKeyboard()->DisableNumLock();
}
DeviceSettingsService::Initialize();
DeviceSettingsService::Get()->SetSessionManager(
DBusThreadManager::Get()->GetSessionManagerClient(),
OwnerKeyUtil::Create());
}
~DBusServices() {
CertLibrary::Shutdown();
NetworkHandler::Shutdown();
cryptohome::AsyncMethodCaller::Shutdown();
disks::DiskMountManager::Shutdown();
input_method::Shutdown();
SystemSaltGetter::Shutdown();
LoginState::Shutdown();
CertLoader::Shutdown();
TPMTokenLoader::Shutdown();
CrosDBusService::Shutdown();
PowerDataCollector::Shutdown();
DBusThreadManager::Shutdown();
}
private:
DISALLOW_COPY_AND_ASSIGN(DBusServices);
};
}
ChromeBrowserMainPartsChromeos::ChromeBrowserMainPartsChromeos(
const content::MainFunctionParams& parameters)
: ChromeBrowserMainPartsLinux(parameters) {
}
ChromeBrowserMainPartsChromeos::~ChromeBrowserMainPartsChromeos() {
if (KioskModeSettings::Get()->IsKioskModeEnabled())
ShutdownKioskModeScreensaver();
BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", false);
BootTimesLoader::Get()->WriteLogoutTimes();
}
void ChromeBrowserMainPartsChromeos::PreEarlyInitialization() {
CommandLine* singleton_command_line = CommandLine::ForCurrentProcess();
if (parsed_command_line().HasSwitch(switches::kGuestSession)) {
singleton_command_line->AppendSwitch(::switches::kDisableSync);
singleton_command_line->AppendSwitch(::switches::kDisableExtensions);
browser_defaults::bookmarks_enabled = false;
}
if (!base::SysInfo::IsRunningOnChromeOS() &&
!parsed_command_line().HasSwitch(switches::kLoginManager) &&
!parsed_command_line().HasSwitch(switches::kLoginUser) &&
!parsed_command_line().HasSwitch(switches::kGuestSession)) {
singleton_command_line->AppendSwitchASCII(
switches::kLoginUser, UserManager::kStubUser);
if (!parsed_command_line().HasSwitch(switches::kLoginProfile)) {
singleton_command_line->AppendSwitchASCII(switches::kLoginProfile,
chrome::kTestUserProfileDir);
}
LOG(WARNING) << "Running as stub user with profile dir: "
<< singleton_command_line->GetSwitchValuePath(
switches::kLoginProfile).value();
}
#if defined(GOOGLE_CHROME_BUILD)
const char kChromeOSReleaseTrack[] = "CHROMEOS_RELEASE_TRACK";
std::string channel;
if (base::SysInfo::GetLsbReleaseValue(kChromeOSReleaseTrack, &channel))
chrome::VersionInfo::SetChannel(channel);
#endif
ChromeBrowserMainPartsLinux::PreEarlyInitialization();
}
void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() {
net::NetworkChangeNotifier::SetFactory(
new NetworkChangeNotifierFactoryChromeos());
ChromeBrowserMainPartsLinux::PreMainMessageLoopStart();
}
void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() {
dbus_services_.reset(new internal::DBusServices(parameters()));
ChromeBrowserMainPartsLinux::PostMainMessageLoopStart();
}
void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() {
TPMTokenLoader::Get()->SetCryptoTaskRunner(
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::IO));
CrasAudioHandler::Initialize(
AudioDevicesPrefHandler::Create(g_browser_process->local_state()));
bool load_oem_statistics = !StartupUtils::IsOobeCompleted();
system::StatisticsProvider::GetInstance()->StartLoadingMachineStatistics(
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::FILE),
load_oem_statistics);
base::FilePath downloads_directory;
CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory));
imageburner::BurnManager::Initialize(
downloads_directory, g_browser_process->system_request_context());
if (base::SysInfo::IsRunningOnChromeOS() &&
!parameters().ui_task) {
SystemKeyEventListener::Initialize();
}
DeviceOAuth2TokenServiceFactory::Initialize();
ChromeBrowserMainPartsLinux::PreMainMessageLoopRun();
}
void ChromeBrowserMainPartsChromeos::PreProfileInit() {
BootTimesLoader::Get()->RecordChromeMainStats();
DeviceSettingsService::Get()->Load();
UserManager::Initialize();
if (KioskModeSettings::Get()->IsKioskModeEnabled())
KioskModeIdleLogout::Initialize();
else
ScreenLocker::InitClass();
g_browser_process->profile_manager();
g_browser_process->platform_part()->profile_helper()->Initialize();
if (parsed_command_line().HasSwitch(::switches::kAllowFileAccess))
ChromeNetworkDelegate::AllowAccessToAllFiles();
bool immediate_login =
parsed_command_line().HasSwitch(switches::kLoginUser) &&
!parsed_command_line().HasSwitch(switches::kLoginPassword);
if (immediate_login){
logging::RedirectChromeLogging(parsed_command_line());
app_order_loader_.reset(
new default_app_order::ExternalLoader(false ));
}
if (!app_order_loader_) {
app_order_loader_.reset(
new default_app_order::ExternalLoader(true ));
}
media::SoundsManager::Create();
AccessibilityManager::Initialize();
MagnificationManager::Initialize();
WallpaperManager::Get()->AddObservers();
cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL,
base::Bind(&ChromeOSVersionCallback),
&tracker_);
if (parsed_command_line().HasSwitch(::switches::kTestType) ||
ShouldAutoLaunchKioskApp(parsed_command_line())) {
WizardController::SetZeroDelays();
}
power_prefs_.reset(new PowerPrefs(
DBusThreadManager::Get()->GetPowerPolicyController()));
ChromeBrowserMainPartsLinux::PreProfileInit();
if (immediate_login) {
std::string username =
parsed_command_line().GetSwitchValueASCII(switches::kLoginUser);
UserManager* user_manager = UserManager::Get();
std::string username_hash =
parsed_command_line().GetSwitchValueASCII(switches::kLoginProfile);
user_manager->UserLoggedIn(username, username_hash, true);
VLOG(1) << "Relaunching browser for user: " << username
<< " with hash: " << username_hash;
}
}
class GuestLanguageSetCallbackData {
public:
explicit GuestLanguageSetCallbackData(Profile* profile) : profile(profile) {
}
static void Callback(const scoped_ptr<GuestLanguageSetCallbackData>& self,
const std::string& locale,
const std::string& loaded_locale,
bool success);
Profile* profile;
};
void GuestLanguageSetCallbackData::Callback(
const scoped_ptr<GuestLanguageSetCallbackData>& self,
const std::string& locale,
const std::string& loaded_locale,
bool success) {
input_method::InputMethodManager* const ime_manager =
input_method::InputMethodManager::Get();
const std::vector<std::string>& input_methods =
ime_manager->GetInputMethodUtil()->GetHardwareInputMethodIds();
for (size_t i = 0; i < input_methods.size(); ++i)
ime_manager->EnableInputMethod(input_methods[i]);
const std::string locale_default_input_method =
ime_manager->GetInputMethodUtil()->
GetLanguageDefaultInputMethodId(loaded_locale);
if (!locale_default_input_method.empty()) {
PrefService* user_prefs = self->profile->GetPrefs();
user_prefs->SetString(prefs::kLanguagePreviousInputMethod,
locale_default_input_method);
ime_manager->EnableInputMethod(locale_default_input_method);
}
const std::vector<std::string>& login_input_methods =
ime_manager->GetInputMethodUtil()->GetHardwareLoginInputMethodIds();
ime_manager->ChangeInputMethod(login_input_methods[0]);
}
void SetGuestLocale(UserManager* const usermanager, Profile* const profile) {
scoped_ptr<GuestLanguageSetCallbackData> data(
new GuestLanguageSetCallbackData(profile));
scoped_ptr<locale_util::SwitchLanguageCallback> callback(
new locale_util::SwitchLanguageCallback(base::Bind(
&GuestLanguageSetCallbackData::Callback, base::Passed(data.Pass()))));
User* const user = usermanager->GetUserByProfile(profile);
usermanager->RespectLocalePreference(profile, user, callback.Pass());
}
void ChromeBrowserMainPartsChromeos::PostProfileInit() {
if (parsed_command_line().HasSwitch(switches::kLoginUser) &&
!parsed_command_line().HasSwitch(switches::kLoginPassword)) {
std::string login_user = parsed_command_line().GetSwitchValueASCII(
chromeos::switches::kLoginUser);
if (!base::SysInfo::IsRunningOnChromeOS() &&
login_user == UserManager::kStubUser) {
profile()->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
login_user);
}
LoginUtils::Get()->InitRlzDelayed(profile());
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
content::NotificationService::AllSources(),
content::Details<Profile>(profile()));
UserManager::Get()->SessionStarted();
UserManager::Get()->RestoreActiveSessions();
}
NetworkPortalDetector::Initialize();
{
NetworkPortalDetector* detector = NetworkPortalDetector::Get();
#if defined(GOOGLE_CHROME_BUILD)
bool is_official_build = true;
#else
bool is_official_build = false;
#endif
if (!is_official_build || StartupUtils::IsEulaAccepted())
detector->Enable(true);
}
if (!parameters().ui_task ||
parsed_command_line().HasSwitch(switches::kForceLoginManagerInTests)) {
OptionallyRunChromeOSLoginManager(parsed_command_line(), profile());
}
UserManager* const usermanager = UserManager::Get();
if (usermanager->IsLoggedInAsGuest())
SetGuestLocale(usermanager, profile());
extension_system_event_observer_.reset(new ExtensionSystemEventObserver());
if (KioskModeSettings::Get()->IsKioskModeEnabled()) {
retail_mode_power_save_blocker_ = content::PowerSaveBlocker::Create(
content::PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep,
"Retail mode");
}
peripheral_battery_observer_.reset(new PeripheralBatteryObserver());
g_browser_process->platform_part()->InitializeAutomaticRebootManager();
idle_action_warning_observer_.reset(new IdleActionWarningObserver());
ChromeBrowserMainPartsLinux::PostProfileInit();
}
void ChromeBrowserMainPartsChromeos::PreBrowserStart() {
g_browser_process->metrics_service()->StartExternalMetrics();
XInputHierarchyChangedEventListener::GetInstance();
#if defined(USE_X11)
DeviceUMA::GetInstance();
#endif
event_rewriter_.reset(new EventRewriter());
g_browser_process->platform_part()->oom_priority_manager()->Start();
if (ui::ShouldDefaultToNaturalScroll()) {
CommandLine::ForCurrentProcess()->AppendSwitch(
chromeos::switches::kNaturalScrollDefault);
system::InputDeviceSettings::Get()->SetTapToClick(true);
}
ChromeBrowserMainPartsLinux::PreBrowserStart();
}
void ChromeBrowserMainPartsChromeos::PostBrowserStart() {
power_button_observer_.reset(new PowerButtonObserver);
data_promo_notification_.reset(new DataPromoNotification()),
ChromeBrowserMainPartsLinux::PostBrowserStart();
}
void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() {
BootTimesLoader::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true);
g_browser_process->platform_part()->oom_priority_manager()->Stop();
KioskModeIdleAppNameNotification::Shutdown();
if (UpgradeDetectorChromeos::GetInstance())
UpgradeDetectorChromeos::GetInstance()->Shutdown();
if (NetworkChangeNotifierFactoryChromeos::GetInstance())
NetworkChangeNotifierFactoryChromeos::GetInstance()->Shutdown();
data_promo_notification_.reset();
DeviceSettingsService::Get()->UnsetSessionManager();
extension_system_event_observer_.reset();
retail_mode_power_save_blocker_.reset();
peripheral_battery_observer_.reset();
power_prefs_.reset();
event_rewriter_.reset();
if (!KioskModeSettings::Get()->IsKioskModeEnabled())
ScreenLocker::ShutDownClass();
XInputHierarchyChangedEventListener::GetInstance()->Stop();
#if defined(USE_X11)
DeviceUMA::GetInstance()->Stop();
#endif
SystemKeyEventListener::Shutdown();
imageburner::BurnManager::Shutdown();
CrasAudioHandler::Shutdown();
power_button_observer_.reset();
idle_action_warning_observer_.reset();
MagnificationManager::Shutdown();
AccessibilityManager::Shutdown();
media::SoundsManager::Shutdown();
system::StatisticsProvider::GetInstance()->Shutdown();
UserManager::Get()->Shutdown();
WallpaperManager::Get()->Shutdown();
g_browser_process->platform_part()->ShutdownAutomaticRebootManager();
KioskAppManager::Shutdown();
ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
DeviceOAuth2TokenServiceFactory::Shutdown();
NetworkPortalDetector::Shutdown();
UserManager::Destroy();
}
void ChromeBrowserMainPartsChromeos::PostDestroyThreads() {
dbus_services_.reset();
ChromeBrowserMainPartsLinux::PostDestroyThreads();
DeviceSettingsService::Shutdown();
}
}