| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 #include "components/user_manager/user_manager.h" | 129 #include "components/user_manager/user_manager.h" |
| 130 #include "components/wallpaper/wallpaper_manager_base.h" | 130 #include "components/wallpaper/wallpaper_manager_base.h" |
| 131 #include "content/public/browser/browser_thread.h" | 131 #include "content/public/browser/browser_thread.h" |
| 132 #include "content/public/browser/notification_service.h" | 132 #include "content/public/browser/notification_service.h" |
| 133 #include "content/public/common/content_switches.h" | 133 #include "content/public/common/content_switches.h" |
| 134 #include "content/public/common/main_function_params.h" | 134 #include "content/public/common/main_function_params.h" |
| 135 #include "device/bluetooth/bluetooth_adapter_factory.h" | 135 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 136 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 136 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| 137 #include "media/audio/sounds/sounds_manager.h" | 137 #include "media/audio/sounds/sounds_manager.h" |
| 138 #include "net/base/network_change_notifier.h" | 138 #include "net/base/network_change_notifier.h" |
| 139 #include "net/socket/ssl_server_socket.h" | |
| 140 #include "net/url_request/url_request.h" | 139 #include "net/url_request/url_request.h" |
| 141 #include "net/url_request/url_request_context_getter.h" | 140 #include "net/url_request/url_request_context_getter.h" |
| 142 #include "printing/backend/print_backend.h" | 141 #include "printing/backend/print_backend.h" |
| 143 #include "ui/base/ime/chromeos/ime_keyboard.h" | 142 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 144 #include "ui/base/ime/chromeos/input_method_manager.h" | 143 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 145 #include "ui/base/touch/touch_device.h" | 144 #include "ui/base/touch/touch_device.h" |
| 146 #include "ui/events/event_utils.h" | 145 #include "ui/events/event_utils.h" |
| 147 | 146 |
| 148 #if defined(ENABLE_RLZ) | 147 #if defined(ENABLE_RLZ) |
| 149 #include "components/rlz/rlz_tracker.h" | 148 #include "components/rlz/rlz_tracker.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 if (!base::SysInfo::IsRunningOnChromeOS() && | 367 if (!base::SysInfo::IsRunningOnChromeOS() && |
| 369 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { | 368 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { |
| 370 // Override some paths with stub locations so that cloud policy and | 369 // Override some paths with stub locations so that cloud policy and |
| 371 // enterprise enrollment work on desktop builds, for ease of | 370 // enterprise enrollment work on desktop builds, for ease of |
| 372 // development. | 371 // development. |
| 373 chromeos::RegisterStubPathOverrides(user_data_dir); | 372 chromeos::RegisterStubPathOverrides(user_data_dir); |
| 374 } | 373 } |
| 375 | 374 |
| 376 dbus_services_.reset(new internal::DBusServices(parameters())); | 375 dbus_services_.reset(new internal::DBusServices(parameters())); |
| 377 | 376 |
| 378 // Enable support for SSL server sockets, which must be done while still | |
| 379 // single-threaded. This is required for remote assistance host on Chrome OS. | |
| 380 net::EnableSSLServerSockets(); | |
| 381 | |
| 382 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); | 377 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); |
| 383 } | 378 } |
| 384 | 379 |
| 385 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. | 380 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. |
| 386 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. | 381 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. |
| 387 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { | 382 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
| 388 // Set the crypto thread after the IO thread has been created/started. | 383 // Set the crypto thread after the IO thread has been created/started. |
| 389 TPMTokenLoader::Get()->SetCryptoTaskRunner( | 384 TPMTokenLoader::Get()->SetCryptoTaskRunner( |
| 390 content::BrowserThread::GetTaskRunnerForThread( | 385 content::BrowserThread::GetTaskRunnerForThread( |
| 391 content::BrowserThread::IO)); | 386 content::BrowserThread::IO)); |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 // Destroy DBus services immediately after threads are stopped. | 878 // Destroy DBus services immediately after threads are stopped. |
| 884 dbus_services_.reset(); | 879 dbus_services_.reset(); |
| 885 | 880 |
| 886 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 881 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 887 | 882 |
| 888 // Destroy DeviceSettingsService after g_browser_process. | 883 // Destroy DeviceSettingsService after g_browser_process. |
| 889 DeviceSettingsService::Shutdown(); | 884 DeviceSettingsService::Shutdown(); |
| 890 } | 885 } |
| 891 | 886 |
| 892 } // namespace chromeos | 887 } // namespace chromeos |
| OLD | NEW |