Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 2338063002: chromeos: Refactor D-Bus client type enum and stub vs. fake naming (Closed)
Patch Set: review comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/chromeos/login/chrome_restart_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #include "chrome/common/pref_names.h" 93 #include "chrome/common/pref_names.h"
94 #include "chromeos/audio/audio_devices_pref_handler_impl.h" 94 #include "chromeos/audio/audio_devices_pref_handler_impl.h"
95 #include "chromeos/audio/cras_audio_handler.h" 95 #include "chromeos/audio/cras_audio_handler.h"
96 #include "chromeos/cert_loader.h" 96 #include "chromeos/cert_loader.h"
97 #include "chromeos/chromeos_paths.h" 97 #include "chromeos/chromeos_paths.h"
98 #include "chromeos/chromeos_switches.h" 98 #include "chromeos/chromeos_switches.h"
99 #include "chromeos/cryptohome/async_method_caller.h" 99 #include "chromeos/cryptohome/async_method_caller.h"
100 #include "chromeos/cryptohome/cryptohome_parameters.h" 100 #include "chromeos/cryptohome/cryptohome_parameters.h"
101 #include "chromeos/cryptohome/homedir_methods.h" 101 #include "chromeos/cryptohome/homedir_methods.h"
102 #include "chromeos/cryptohome/system_salt_getter.h" 102 #include "chromeos/cryptohome/system_salt_getter.h"
103 #include "chromeos/dbus/dbus_client_types.h"
103 #include "chromeos/dbus/dbus_thread_manager.h" 104 #include "chromeos/dbus/dbus_thread_manager.h"
104 #include "chromeos/dbus/power_policy_controller.h" 105 #include "chromeos/dbus/power_policy_controller.h"
105 #include "chromeos/dbus/services/console_service_provider.h" 106 #include "chromeos/dbus/services/console_service_provider.h"
106 #include "chromeos/dbus/services/cros_dbus_service.h" 107 #include "chromeos/dbus/services/cros_dbus_service.h"
107 #include "chromeos/dbus/services/display_power_service_provider.h" 108 #include "chromeos/dbus/services/display_power_service_provider.h"
108 #include "chromeos/dbus/services/liveness_service_provider.h" 109 #include "chromeos/dbus/services/liveness_service_provider.h"
109 #include "chromeos/dbus/services/proxy_resolution_service_provider.h" 110 #include "chromeos/dbus/services/proxy_resolution_service_provider.h"
110 #include "chromeos/dbus/session_manager_client.h" 111 #include "chromeos/dbus/session_manager_client.h"
111 #include "chromeos/disks/disk_mount_manager.h" 112 #include "chromeos/disks/disk_mount_manager.h"
112 #include "chromeos/login/login_state.h" 113 #include "chromeos/login/login_state.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // destructor will get called if and only if this has been instantiated. 197 // destructor will get called if and only if this has been instantiated.
197 class DBusServices { 198 class DBusServices {
198 public: 199 public:
199 explicit DBusServices(const content::MainFunctionParams& parameters) { 200 explicit DBusServices(const content::MainFunctionParams& parameters) {
200 // Initialize DBusThreadManager for the browser. This must be done after 201 // Initialize DBusThreadManager for the browser. This must be done after
201 // the main message loop is started, as it uses the message loop. 202 // the main message loop is started, as it uses the message loop.
202 DBusThreadManager::Initialize(); 203 DBusThreadManager::Initialize();
203 204
204 bluez::BluezDBusManager::Initialize( 205 bluez::BluezDBusManager::Initialize(
205 DBusThreadManager::Get()->GetSystemBus(), 206 DBusThreadManager::Get()->GetSystemBus(),
206 chromeos::DBusThreadManager::Get()->IsUsingStub( 207 chromeos::DBusThreadManager::Get()->IsUsingFake(
207 chromeos::DBusClientBundle::BLUETOOTH)); 208 chromeos::DBusClientType::BLUETOOTH));
208 209
209 PowerPolicyController::Initialize( 210 PowerPolicyController::Initialize(
210 DBusThreadManager::Get()->GetPowerManagerClient()); 211 DBusThreadManager::Get()->GetPowerManagerClient());
211 212
212 CrosDBusService::ServiceProviderList service_providers; 213 CrosDBusService::ServiceProviderList service_providers;
213 service_providers.push_back( 214 service_providers.push_back(
214 base::WrapUnique(ProxyResolutionServiceProvider::Create( 215 base::WrapUnique(ProxyResolutionServiceProvider::Create(
215 base::MakeUnique<ChromeProxyResolverDelegate>()))); 216 base::MakeUnique<ChromeProxyResolverDelegate>())));
216 if (!chrome::IsRunningInMash()) { 217 if (!chrome::IsRunningInMash()) {
217 // TODO(crbug.com/629707): revisit this with mustash dbus work. 218 // TODO(crbug.com/629707): revisit this with mustash dbus work.
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 // Destroy DBus services immediately after threads are stopped. 879 // Destroy DBus services immediately after threads are stopped.
879 dbus_services_.reset(); 880 dbus_services_.reset();
880 881
881 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 882 ChromeBrowserMainPartsLinux::PostDestroyThreads();
882 883
883 // Destroy DeviceSettingsService after g_browser_process. 884 // Destroy DeviceSettingsService after g_browser_process.
884 DeviceSettingsService::Shutdown(); 885 DeviceSettingsService::Shutdown();
885 } 886 }
886 887
887 } // namespace chromeos 888 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/browser/chromeos/login/chrome_restart_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698