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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 #include "components/metrics/metrics_service.h" | 108 #include "components/metrics/metrics_service.h" |
109 #include "components/ownership/owner_key_util.h" | 109 #include "components/ownership/owner_key_util.h" |
110 #include "components/session_manager/core/session_manager.h" | 110 #include "components/session_manager/core/session_manager.h" |
111 #include "components/user_manager/user.h" | 111 #include "components/user_manager/user.h" |
112 #include "components/user_manager/user_manager.h" | 112 #include "components/user_manager/user_manager.h" |
113 #include "content/public/browser/browser_thread.h" | 113 #include "content/public/browser/browser_thread.h" |
114 #include "content/public/browser/notification_service.h" | 114 #include "content/public/browser/notification_service.h" |
115 #include "content/public/browser/power_save_blocker.h" | 115 #include "content/public/browser/power_save_blocker.h" |
116 #include "content/public/common/main_function_params.h" | 116 #include "content/public/common/main_function_params.h" |
117 #include "media/audio/sounds/sounds_manager.h" | 117 #include "media/audio/sounds/sounds_manager.h" |
118 #include "media/base/media.h" | |
118 #include "net/base/network_change_notifier.h" | 119 #include "net/base/network_change_notifier.h" |
120 #include "net/socket/ssl_server_socket.h" | |
119 #include "net/url_request/url_request.h" | 121 #include "net/url_request/url_request.h" |
120 #include "net/url_request/url_request_context_getter.h" | 122 #include "net/url_request/url_request_context_getter.h" |
121 #include "ui/base/touch/touch_device.h" | 123 #include "ui/base/touch/touch_device.h" |
122 #include "ui/events/event_utils.h" | 124 #include "ui/events/event_utils.h" |
123 | 125 |
124 // Exclude X11 dependents for ozone | 126 // Exclude X11 dependents for ozone |
125 #if defined(USE_X11) | 127 #if defined(USE_X11) |
126 #include "chrome/browser/chromeos/device_uma.h" | 128 #include "chrome/browser/chromeos/device_uma.h" |
127 #include "chrome/browser/chromeos/events/system_key_event_listener.h" | 129 #include "chrome/browser/chromeos/events/system_key_event_listener.h" |
128 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h" | 130 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 if (!base::SysInfo::IsRunningOnChromeOS() && | 293 if (!base::SysInfo::IsRunningOnChromeOS() && |
292 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { | 294 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { |
293 // Override some paths with stub locations so that cloud policy and | 295 // Override some paths with stub locations so that cloud policy and |
294 // enterprise enrollment work on desktop builds, for ease of | 296 // enterprise enrollment work on desktop builds, for ease of |
295 // development. | 297 // development. |
296 chromeos::RegisterStubPathOverrides(user_data_dir); | 298 chromeos::RegisterStubPathOverrides(user_data_dir); |
297 } | 299 } |
298 | 300 |
299 dbus_services_.reset(new internal::DBusServices(parameters())); | 301 dbus_services_.reset(new internal::DBusServices(parameters())); |
300 | 302 |
303 // Enable support for SSL server sockets, which must be done while still | |
304 // single-threaded. This is required for remote assistance host on Chrome OS. | |
305 net::EnableSSLServerSockets(); | |
306 | |
307 // Ensures runtime specific CPU features are initialized. | |
308 media::InitializeCPUSpecificMediaFeatures(); | |
Wez
2014/10/17 17:57:59
Is this also required only for the RA host?
Is it
kelvinp
2014/10/20 00:21:16
Done.
| |
309 | |
301 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); | 310 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); |
302 } | 311 } |
303 | 312 |
304 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. | 313 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. |
305 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. | 314 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. |
306 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { | 315 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
307 // Set the crypto thread after the IO thread has been created/started. | 316 // Set the crypto thread after the IO thread has been created/started. |
308 TPMTokenLoader::Get()->SetCryptoTaskRunner( | 317 TPMTokenLoader::Get()->SetCryptoTaskRunner( |
309 content::BrowserThread::GetMessageLoopProxyForThread( | 318 content::BrowserThread::GetMessageLoopProxyForThread( |
310 content::BrowserThread::IO)); | 319 content::BrowserThread::IO)); |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
766 // Destroy DBus services immediately after threads are stopped. | 775 // Destroy DBus services immediately after threads are stopped. |
767 dbus_services_.reset(); | 776 dbus_services_.reset(); |
768 | 777 |
769 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 778 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
770 | 779 |
771 // Destroy DeviceSettingsService after g_browser_process. | 780 // Destroy DeviceSettingsService after g_browser_process. |
772 DeviceSettingsService::Shutdown(); | 781 DeviceSettingsService::Shutdown(); |
773 } | 782 } |
774 | 783 |
775 } // namespace chromeos | 784 } // namespace chromeos |
OLD | NEW |