| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" | 69 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" |
| 70 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 70 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 71 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 71 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
| 72 #include "chrome/browser/chromeos/system/input_device_settings.h" | 72 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 73 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 73 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
| 74 #include "chrome/browser/defaults.h" | 74 #include "chrome/browser/defaults.h" |
| 75 #include "chrome/browser/lifetime/application_lifetime.h" | 75 #include "chrome/browser/lifetime/application_lifetime.h" |
| 76 #include "chrome/browser/net/chrome_network_delegate.h" | 76 #include "chrome/browser/net/chrome_network_delegate.h" |
| 77 #include "chrome/browser/profiles/profile.h" | 77 #include "chrome/browser/profiles/profile.h" |
| 78 #include "chrome/browser/profiles/profile_manager.h" | 78 #include "chrome/browser/profiles/profile_manager.h" |
| 79 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
| 79 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" | 80 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" |
| 80 #include "chrome/common/channel_info.h" | 81 #include "chrome/common/channel_info.h" |
| 81 #include "chrome/common/chrome_constants.h" | 82 #include "chrome/common/chrome_constants.h" |
| 82 #include "chrome/common/chrome_paths.h" | 83 #include "chrome/common/chrome_paths.h" |
| 83 #include "chrome/common/chrome_switches.h" | 84 #include "chrome/common/chrome_switches.h" |
| 84 #include "chrome/common/logging_chrome.h" | 85 #include "chrome/common/logging_chrome.h" |
| 85 #include "chrome/common/pref_names.h" | 86 #include "chrome/common/pref_names.h" |
| 86 #include "chromeos/audio/audio_devices_pref_handler_impl.h" | 87 #include "chromeos/audio/audio_devices_pref_handler_impl.h" |
| 87 #include "chromeos/audio/cras_audio_handler.h" | 88 #include "chromeos/audio/cras_audio_handler.h" |
| 88 #include "chromeos/cert_loader.h" | 89 #include "chromeos/cert_loader.h" |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 new RendererFreezer(scoped_ptr<RendererFreezer::Delegate>( | 632 new RendererFreezer(scoped_ptr<RendererFreezer::Delegate>( |
| 632 new FreezerCgroupProcessManager()))); | 633 new FreezerCgroupProcessManager()))); |
| 633 | 634 |
| 634 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); | 635 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); |
| 635 g_browser_process->platform_part()->InitializeDeviceDisablingManager(); | 636 g_browser_process->platform_part()->InitializeDeviceDisablingManager(); |
| 636 | 637 |
| 637 // This observer cannot be created earlier because it requires the shell to be | 638 // This observer cannot be created earlier because it requires the shell to be |
| 638 // available. | 639 // available. |
| 639 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); | 640 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); |
| 640 | 641 |
| 642 if (arc::ArcBridgeService::GetEnabled( |
| 643 base::CommandLine::ForCurrentProcess())) { |
| 644 DCHECK(arc_service_manager_); |
| 645 arc_service_manager_->PostProfileInit( |
| 646 multi_user_util::GetAccountIdFromProfile(profile())); |
| 647 } |
| 648 |
| 641 ChromeBrowserMainPartsLinux::PostProfileInit(); | 649 ChromeBrowserMainPartsLinux::PostProfileInit(); |
| 642 } | 650 } |
| 643 | 651 |
| 644 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { | 652 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { |
| 645 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 653 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 646 // -- just before MetricsService::LogNeedForCleanShutdown(). | 654 // -- just before MetricsService::LogNeedForCleanShutdown(). |
| 647 | 655 |
| 648 // Start the external metrics service, which collects metrics from Chrome OS | 656 // Start the external metrics service, which collects metrics from Chrome OS |
| 649 // and passes them to the browser process. | 657 // and passes them to the browser process. |
| 650 external_metrics_ = new chromeos::ExternalMetrics; | 658 external_metrics_ = new chromeos::ExternalMetrics; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 // Destroy DBus services immediately after threads are stopped. | 828 // Destroy DBus services immediately after threads are stopped. |
| 821 dbus_services_.reset(); | 829 dbus_services_.reset(); |
| 822 | 830 |
| 823 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 831 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 824 | 832 |
| 825 // Destroy DeviceSettingsService after g_browser_process. | 833 // Destroy DeviceSettingsService after g_browser_process. |
| 826 DeviceSettingsService::Shutdown(); | 834 DeviceSettingsService::Shutdown(); |
| 827 } | 835 } |
| 828 | 836 |
| 829 } // namespace chromeos | 837 } // namespace chromeos |
| OLD | NEW |