Chromium Code Reviews| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 #include "components/rlz/rlz_tracker.h" | 140 #include "components/rlz/rlz_tracker.h" |
| 141 #endif | 141 #endif |
| 142 | 142 |
| 143 // Exclude X11 dependents for ozone | 143 // Exclude X11 dependents for ozone |
| 144 #if defined(USE_X11) | 144 #if defined(USE_X11) |
| 145 #include "chrome/browser/chromeos/device_uma.h" | 145 #include "chrome/browser/chromeos/device_uma.h" |
| 146 #include "chrome/browser/chromeos/events/system_key_event_listener.h" | 146 #include "chrome/browser/chromeos/events/system_key_event_listener.h" |
| 147 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h" | 147 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h" |
| 148 #endif | 148 #endif |
| 149 | 149 |
| 150 #if defined(USE_ASH) | |
| 151 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | |
| 152 #endif | |
| 153 | |
| 150 namespace chromeos { | 154 namespace chromeos { |
| 151 | 155 |
| 152 namespace { | 156 namespace { |
| 153 | 157 |
| 154 void ChromeOSVersionCallback(const std::string& version) { | 158 void ChromeOSVersionCallback(const std::string& version) { |
| 155 base::SetLinuxDistro(std::string("CrOS ") + version); | 159 base::SetLinuxDistro(std::string("CrOS ") + version); |
| 156 } | 160 } |
| 157 | 161 |
| 158 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) { | 162 bool ShouldAutoLaunchKioskApp(const base::CommandLine& command_line) { |
| 159 KioskAppManager* app_manager = KioskAppManager::Get(); | 163 KioskAppManager* app_manager = KioskAppManager::Get(); |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 631 new RendererFreezer(scoped_ptr<RendererFreezer::Delegate>( | 635 new RendererFreezer(scoped_ptr<RendererFreezer::Delegate>( |
| 632 new FreezerCgroupProcessManager()))); | 636 new FreezerCgroupProcessManager()))); |
| 633 | 637 |
| 634 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); | 638 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); |
| 635 g_browser_process->platform_part()->InitializeDeviceDisablingManager(); | 639 g_browser_process->platform_part()->InitializeDeviceDisablingManager(); |
| 636 | 640 |
| 637 // This observer cannot be created earlier because it requires the shell to be | 641 // This observer cannot be created earlier because it requires the shell to be |
| 638 // available. | 642 // available. |
| 639 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); | 643 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); |
| 640 | 644 |
| 645 // TODO(yoshiki): Make the ArcNotificationManager instance managed by | |
| 646 // ArcServiceManager, when it can manage a service under C/B/chromeos | |
|
elijahtaylor1
2015/12/16 02:34:37
seems this comment is out of date now?
Luis Héctor Chávez
2015/12/17 17:43:09
components/arc cannot have any dependency to chrom
yoshiki
2015/12/17 19:15:13
Yes, removed.
| |
| 647 // (crbug.com/569562). | |
| 648 if (arc::ArcBridgeService::GetEnabled( | |
| 649 base::CommandLine::ForCurrentProcess())) { | |
| 650 DCHECK(arc_service_manager_); | |
| 651 #if defined(USE_ASH) | |
|
Luis Héctor Chávez
2015/12/17 17:43:09
Why not gate the whole chunk with USE_ASH instead
yoshiki
2015/12/17 19:15:13
multi_user_util.[h|cc] is in ash/ directory so I t
| |
| 652 arc_service_manager_->PostProfileInit( | |
| 653 multi_user_util::GetAccountIdFromProfile(profile())); | |
| 654 #endif // defined(USE_ASH) | |
| 655 } | |
| 656 | |
| 641 ChromeBrowserMainPartsLinux::PostProfileInit(); | 657 ChromeBrowserMainPartsLinux::PostProfileInit(); |
| 642 } | 658 } |
| 643 | 659 |
| 644 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { | 660 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { |
| 645 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 661 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 646 // -- just before MetricsService::LogNeedForCleanShutdown(). | 662 // -- just before MetricsService::LogNeedForCleanShutdown(). |
| 647 | 663 |
| 648 // Start the external metrics service, which collects metrics from Chrome OS | 664 // Start the external metrics service, which collects metrics from Chrome OS |
| 649 // and passes them to the browser process. | 665 // and passes them to the browser process. |
| 650 external_metrics_ = new chromeos::ExternalMetrics; | 666 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. | 836 // Destroy DBus services immediately after threads are stopped. |
| 821 dbus_services_.reset(); | 837 dbus_services_.reset(); |
| 822 | 838 |
| 823 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 839 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 824 | 840 |
| 825 // Destroy DeviceSettingsService after g_browser_process. | 841 // Destroy DeviceSettingsService after g_browser_process. |
| 826 DeviceSettingsService::Shutdown(); | 842 DeviceSettingsService::Shutdown(); |
| 827 } | 843 } |
| 828 | 844 |
| 829 } // namespace chromeos | 845 } // namespace chromeos |
| OLD | NEW |