| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 #include "components/ownership/owner_key_util.h" | 106 #include "components/ownership/owner_key_util.h" |
| 107 #include "components/session_manager/core/session_manager.h" | 107 #include "components/session_manager/core/session_manager.h" |
| 108 #include "components/user_manager/user.h" | 108 #include "components/user_manager/user.h" |
| 109 #include "components/user_manager/user_manager.h" | 109 #include "components/user_manager/user_manager.h" |
| 110 #include "content/public/browser/browser_thread.h" | 110 #include "content/public/browser/browser_thread.h" |
| 111 #include "content/public/browser/notification_service.h" | 111 #include "content/public/browser/notification_service.h" |
| 112 #include "content/public/browser/power_save_blocker.h" | 112 #include "content/public/browser/power_save_blocker.h" |
| 113 #include "content/public/common/main_function_params.h" | 113 #include "content/public/common/main_function_params.h" |
| 114 #include "media/audio/sounds/sounds_manager.h" | 114 #include "media/audio/sounds/sounds_manager.h" |
| 115 #include "net/base/network_change_notifier.h" | 115 #include "net/base/network_change_notifier.h" |
| 116 #include "net/socket/ssl_server_socket.h" |
| 116 #include "net/url_request/url_request.h" | 117 #include "net/url_request/url_request.h" |
| 117 #include "net/url_request/url_request_context_getter.h" | 118 #include "net/url_request/url_request_context_getter.h" |
| 118 #include "ui/base/touch/touch_device.h" | 119 #include "ui/base/touch/touch_device.h" |
| 119 #include "ui/events/event_utils.h" | 120 #include "ui/events/event_utils.h" |
| 120 | 121 |
| 121 // Exclude X11 dependents for ozone | 122 // Exclude X11 dependents for ozone |
| 122 #if defined(USE_X11) | 123 #if defined(USE_X11) |
| 123 #include "chrome/browser/chromeos/device_uma.h" | 124 #include "chrome/browser/chromeos/device_uma.h" |
| 124 #include "chrome/browser/chromeos/events/system_key_event_listener.h" | 125 #include "chrome/browser/chromeos/events/system_key_event_listener.h" |
| 125 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener
.h" | 126 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener
.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 if (!base::SysInfo::IsRunningOnChromeOS() && | 305 if (!base::SysInfo::IsRunningOnChromeOS() && |
| 305 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { | 306 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { |
| 306 // Override some paths with stub locations so that cloud policy and | 307 // Override some paths with stub locations so that cloud policy and |
| 307 // enterprise enrollment work on desktop builds, for ease of | 308 // enterprise enrollment work on desktop builds, for ease of |
| 308 // development. | 309 // development. |
| 309 chromeos::RegisterStubPathOverrides(user_data_dir); | 310 chromeos::RegisterStubPathOverrides(user_data_dir); |
| 310 } | 311 } |
| 311 | 312 |
| 312 dbus_services_.reset(new internal::DBusServices(parameters())); | 313 dbus_services_.reset(new internal::DBusServices(parameters())); |
| 313 | 314 |
| 315 // Enable support for SSL server sockets, which must be done while still |
| 316 // single-threaded. This is required for remote assistance host on Chrome OS. |
| 317 net::EnableSSLServerSockets(); |
| 318 |
| 314 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); | 319 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); |
| 315 } | 320 } |
| 316 | 321 |
| 317 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. | 322 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. |
| 318 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. | 323 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. |
| 319 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { | 324 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
| 320 // Set the crypto thread after the IO thread has been created/started. | 325 // Set the crypto thread after the IO thread has been created/started. |
| 321 TPMTokenLoader::Get()->SetCryptoTaskRunner( | 326 TPMTokenLoader::Get()->SetCryptoTaskRunner( |
| 322 content::BrowserThread::GetMessageLoopProxyForThread( | 327 content::BrowserThread::GetMessageLoopProxyForThread( |
| 323 content::BrowserThread::IO)); | 328 content::BrowserThread::IO)); |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 // Destroy DBus services immediately after threads are stopped. | 787 // Destroy DBus services immediately after threads are stopped. |
| 783 dbus_services_.reset(); | 788 dbus_services_.reset(); |
| 784 | 789 |
| 785 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 790 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 786 | 791 |
| 787 // Destroy DeviceSettingsService after g_browser_process. | 792 // Destroy DeviceSettingsService after g_browser_process. |
| 788 DeviceSettingsService::Shutdown(); | 793 DeviceSettingsService::Shutdown(); |
| 789 } | 794 } |
| 790 | 795 |
| 791 } // namespace chromeos | 796 } // namespace chromeos |
| OLD | NEW |