| 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 12 matching lines...) Expand all Loading... |
| 23 #include "base/sys_info.h" | 23 #include "base/sys_info.h" |
| 24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
| 25 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 25 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
| 26 #include "chrome/browser/chrome_notification_types.h" | 26 #include "chrome/browser/chrome_notification_types.h" |
| 27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 28 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 28 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
| 29 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" | 29 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" |
| 30 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 30 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 31 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification
.h" | 31 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification
.h" |
| 32 #include "chrome/browser/chromeos/boot_times_loader.h" | 32 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 33 #include "chrome/browser/chromeos/contacts/contact_manager.h" | |
| 34 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" | 33 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" |
| 35 #include "chrome/browser/chromeos/events/event_rewriter.h" | 34 #include "chrome/browser/chromeos/events/event_rewriter.h" |
| 36 #include "chrome/browser/chromeos/events/system_key_event_listener.h" | 35 #include "chrome/browser/chromeos/events/system_key_event_listener.h" |
| 37 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener
.h" | 36 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener
.h" |
| 38 #include "chrome/browser/chromeos/extensions/default_app_order.h" | 37 #include "chrome/browser/chromeos/extensions/default_app_order.h" |
| 39 #include "chrome/browser/chromeos/extensions/extension_system_event_observer.h" | 38 #include "chrome/browser/chromeos/extensions/extension_system_event_observer.h" |
| 40 #include "chrome/browser/chromeos/external_metrics.h" | 39 #include "chrome/browser/chromeos/external_metrics.h" |
| 41 #include "chrome/browser/chromeos/imageburner/burn_manager.h" | 40 #include "chrome/browser/chromeos/imageburner/burn_manager.h" |
| 42 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 41 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
| 43 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 42 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 g_browser_process->profile_manager(); | 482 g_browser_process->profile_manager(); |
| 484 | 483 |
| 485 // ProfileHelper has to be initialized after UserManager instance is created. | 484 // ProfileHelper has to be initialized after UserManager instance is created. |
| 486 g_browser_process->platform_part()->profile_helper()->Initialize(); | 485 g_browser_process->platform_part()->profile_helper()->Initialize(); |
| 487 | 486 |
| 488 // TODO(abarth): Should this move to InitializeNetworkOptions()? | 487 // TODO(abarth): Should this move to InitializeNetworkOptions()? |
| 489 // Allow access to file:// on ChromeOS for tests. | 488 // Allow access to file:// on ChromeOS for tests. |
| 490 if (parsed_command_line().HasSwitch(::switches::kAllowFileAccess)) | 489 if (parsed_command_line().HasSwitch(::switches::kAllowFileAccess)) |
| 491 ChromeNetworkDelegate::AllowAccessToAllFiles(); | 490 ChromeNetworkDelegate::AllowAccessToAllFiles(); |
| 492 | 491 |
| 493 if (parsed_command_line().HasSwitch(::switches::kEnableContacts)) { | |
| 494 contact_manager_.reset(new contacts::ContactManager()); | |
| 495 contact_manager_->Init(); | |
| 496 } | |
| 497 | |
| 498 // There are two use cases for kLoginUser: | 492 // There are two use cases for kLoginUser: |
| 499 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" | 493 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" |
| 500 // 2) if passed alone, to signal that the indicated user has already | 494 // 2) if passed alone, to signal that the indicated user has already |
| 501 // logged in and we should behave accordingly. | 495 // logged in and we should behave accordingly. |
| 502 // This handles case 2. | 496 // This handles case 2. |
| 503 bool immediate_login = | 497 bool immediate_login = |
| 504 parsed_command_line().HasSwitch(switches::kLoginUser) && | 498 parsed_command_line().HasSwitch(switches::kLoginUser) && |
| 505 !parsed_command_line().HasSwitch(switches::kLoginPassword); | 499 !parsed_command_line().HasSwitch(switches::kLoginPassword); |
| 506 if (immediate_login){ | 500 if (immediate_login){ |
| 507 // Redirects Chrome logging to the user data dir. | 501 // Redirects Chrome logging to the user data dir. |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 // SystemKeyEventListener::Shutdown() is always safe to call, | 801 // SystemKeyEventListener::Shutdown() is always safe to call, |
| 808 // even if Initialize() wasn't called. | 802 // even if Initialize() wasn't called. |
| 809 SystemKeyEventListener::Shutdown(); | 803 SystemKeyEventListener::Shutdown(); |
| 810 imageburner::BurnManager::Shutdown(); | 804 imageburner::BurnManager::Shutdown(); |
| 811 CrasAudioHandler::Shutdown(); | 805 CrasAudioHandler::Shutdown(); |
| 812 | 806 |
| 813 // Detach D-Bus clients before DBusThreadManager is shut down. | 807 // Detach D-Bus clients before DBusThreadManager is shut down. |
| 814 power_button_observer_.reset(); | 808 power_button_observer_.reset(); |
| 815 idle_action_warning_observer_.reset(); | 809 idle_action_warning_observer_.reset(); |
| 816 | 810 |
| 817 // Delete ContactManager while |g_browser_process| is still alive. | |
| 818 contact_manager_.reset(); | |
| 819 | |
| 820 MagnificationManager::Shutdown(); | 811 MagnificationManager::Shutdown(); |
| 821 AccessibilityManager::Shutdown(); | 812 AccessibilityManager::Shutdown(); |
| 822 | 813 |
| 823 media::SoundsManager::Shutdown(); | 814 media::SoundsManager::Shutdown(); |
| 824 | 815 |
| 825 system::StatisticsProvider::GetInstance()->Shutdown(); | 816 system::StatisticsProvider::GetInstance()->Shutdown(); |
| 826 | 817 |
| 827 // Let the UserManager and WallpaperManager unregister itself as an observer | 818 // Let the UserManager and WallpaperManager unregister itself as an observer |
| 828 // of the CrosSettings singleton before it is destroyed. This also ensures | 819 // of the CrosSettings singleton before it is destroyed. This also ensures |
| 829 // that the UserManager has no URLRequest pending (see | 820 // that the UserManager has no URLRequest pending (see |
| (...skipping 25 matching lines...) Expand all Loading... |
| 855 // Destroy DBus services immediately after threads are stopped. | 846 // Destroy DBus services immediately after threads are stopped. |
| 856 dbus_services_.reset(); | 847 dbus_services_.reset(); |
| 857 | 848 |
| 858 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 849 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 859 | 850 |
| 860 // Destroy DeviceSettingsService after g_browser_process. | 851 // Destroy DeviceSettingsService after g_browser_process. |
| 861 DeviceSettingsService::Shutdown(); | 852 DeviceSettingsService::Shutdown(); |
| 862 } | 853 } |
| 863 | 854 |
| 864 } // namespace chromeos | 855 } // namespace chromeos |
| OLD | NEW |