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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 83 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 84 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" | 84 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" |
| 85 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " | 85 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " |
| 86 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 86 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 87 #include "chrome/browser/chromeos/settings/shutdown_policy_forwarder.h" | 87 #include "chrome/browser/chromeos/settings/shutdown_policy_forwarder.h" |
| 88 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 88 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
| 89 #include "chrome/browser/chromeos/system/input_device_settings.h" | 89 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 90 #include "chrome/browser/chromeos/ui/low_disk_notification.h" | 90 #include "chrome/browser/chromeos/ui/low_disk_notification.h" |
| 91 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 91 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
| 92 #include "chrome/browser/defaults.h" | 92 #include "chrome/browser/defaults.h" |
| 93 #include "chrome/browser/extensions/extension_error_reporter.h" | |
| 93 #include "chrome/browser/lifetime/application_lifetime.h" | 94 #include "chrome/browser/lifetime/application_lifetime.h" |
| 94 #include "chrome/browser/net/chrome_network_delegate.h" | 95 #include "chrome/browser/net/chrome_network_delegate.h" |
| 95 #include "chrome/browser/profiles/profile.h" | 96 #include "chrome/browser/profiles/profile.h" |
| 96 #include "chrome/browser/profiles/profile_manager.h" | 97 #include "chrome/browser/profiles/profile_manager.h" |
| 97 #include "chrome/browser/task_manager/task_manager_interface.h" | 98 #include "chrome/browser/task_manager/task_manager_interface.h" |
| 98 #include "chrome/browser/ui/ash/ash_util.h" | 99 #include "chrome/browser/ui/ash/ash_util.h" |
| 99 #include "chrome/common/channel_info.h" | 100 #include "chrome/common/channel_info.h" |
| 100 #include "chrome/common/chrome_constants.h" | 101 #include "chrome/common/chrome_constants.h" |
| 101 #include "chrome/common/chrome_paths.h" | 102 #include "chrome/common/chrome_paths.h" |
| 102 #include "chrome/common/chrome_switches.h" | 103 #include "chrome/common/chrome_switches.h" |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 703 | 704 |
| 704 // Initialize input methods. | 705 // Initialize input methods. |
| 705 input_method::InputMethodManager* manager = | 706 input_method::InputMethodManager* manager = |
| 706 input_method::InputMethodManager::Get(); | 707 input_method::InputMethodManager::Get(); |
| 707 UserSessionManager* session_manager = UserSessionManager::GetInstance(); | 708 UserSessionManager* session_manager = UserSessionManager::GetInstance(); |
| 708 DCHECK(manager); | 709 DCHECK(manager); |
| 709 DCHECK(session_manager); | 710 DCHECK(session_manager); |
| 710 | 711 |
| 711 manager->SetState(session_manager->GetDefaultIMEState(profile())); | 712 manager->SetState(session_manager->GetDefaultIMEState(profile())); |
| 712 | 713 |
| 714 ExtensionErrorReporter::GetInstance()->OnProfileInitialized(); | |
|
Alexander Alekseev
2017/04/19 21:53:32
You need to pass profile() here and later check th
Wenzhao (Colin) Zang
2017/04/21 22:41:49
Done.
| |
| 715 | |
| 713 bool is_running_test = parameters().ui_task != nullptr; | 716 bool is_running_test = parameters().ui_task != nullptr; |
| 714 g_browser_process->platform_part()->session_manager()->Initialize( | 717 g_browser_process->platform_part()->session_manager()->Initialize( |
| 715 parsed_command_line(), profile(), is_running_test); | 718 parsed_command_line(), profile(), is_running_test); |
| 716 | 719 |
| 717 // Guest user profile is never initialized with locale settings, | 720 // Guest user profile is never initialized with locale settings, |
| 718 // so we need special handling for Guest session. | 721 // so we need special handling for Guest session. |
| 719 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) | 722 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) |
| 720 SetGuestLocale(profile()); | 723 SetGuestLocale(profile()); |
| 721 | 724 |
| 722 // This observer uses the intialized profile to dispatch extension events. | 725 // This observer uses the intialized profile to dispatch extension events. |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 957 | 960 |
| 958 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 961 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 959 | 962 |
| 960 // Destroy DeviceSettingsService after g_browser_process. | 963 // Destroy DeviceSettingsService after g_browser_process. |
| 961 DeviceSettingsService::Shutdown(); | 964 DeviceSettingsService::Shutdown(); |
| 962 | 965 |
| 963 chromeos::ShutdownCloseTracking(); | 966 chromeos::ShutdownCloseTracking(); |
| 964 } | 967 } |
| 965 | 968 |
| 966 } // namespace chromeos | 969 } // namespace chromeos |
| OLD | NEW |