| Index: chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| index f7c6ecaf43d281affc133966bc7727fee0eea19f..04f6e6282c6c7537197b5d48d3fc7011d15252c1 100644
|
| --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
|
| @@ -11,6 +11,7 @@
|
| #include <vector>
|
|
|
| #include "ash/common/ash_switches.h"
|
| +#include "ash/common/dbus_thread_manager_ash.h"
|
| #include "ash/shell.h"
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| @@ -41,6 +42,7 @@
|
| #include "chrome/browser/chromeos/dbus/chrome_proxy_resolver_delegate.h"
|
| #include "chrome/browser/chromeos/dbus/kiosk_info_service_provider.h"
|
| #include "chrome/browser/chromeos/dbus/screen_lock_service_provider.h"
|
| +#include "chrome/browser/chromeos/dbus_thread_manager_chrome.h"
|
| #include "chrome/browser/chromeos/display/quirks_manager_delegate_impl.h"
|
| #include "chrome/browser/chromeos/events/event_rewriter.h"
|
| #include "chrome/browser/chromeos/events/event_rewriter_controller.h"
|
| @@ -101,6 +103,7 @@
|
| #include "chromeos/cryptohome/cryptohome_parameters.h"
|
| #include "chromeos/cryptohome/homedir_methods.h"
|
| #include "chromeos/cryptohome/system_salt_getter.h"
|
| +#include "chromeos/dbus/dbus_client_bundle.h"
|
| #include "chromeos/dbus/dbus_thread_manager.h"
|
| #include "chromeos/dbus/power_policy_controller.h"
|
| #include "chromeos/dbus/services/console_service_provider.h"
|
| @@ -198,13 +201,21 @@ namespace internal {
|
| class DBusServices {
|
| public:
|
| explicit DBusServices(const content::MainFunctionParams& parameters) {
|
| + DBusClientTypeMask dbus_clients = DBusClientBundle::ALL_CLIENTS;
|
| + // Under mustash the ash process handles SMS D-Bus services.
|
| + if (chrome::IsRunningInMash()) {
|
| + dbus_clients &= ~DBusClientBundle::GSM_SMS;
|
| + dbus_clients &= ~DBusClientBundle::SMS;
|
| + }
|
| // Initialize DBusThreadManager for the browser. This must be done after
|
| // the main message loop is started, as it uses the message loop.
|
| - DBusThreadManager::Initialize();
|
| + DBusThreadManager::Initialize(dbus_clients);
|
| + thread_manager_ash_.reset(new ash::DBusThreadManagerAsh());
|
| + thread_manager_chrome_.reset(new DBusThreadManagerChrome());
|
|
|
| bluez::BluezDBusManager::Initialize(
|
| DBusThreadManager::Get()->GetSystemBus(),
|
| - chromeos::DBusThreadManager::Get()->IsUsingStub(
|
| + chromeos::DBusThreadManager::Get()->IsUsingFake(
|
| chromeos::DBusClientBundle::BLUETOOTH));
|
|
|
| PowerPolicyController::Initialize(
|
| @@ -280,11 +291,16 @@ class DBusServices {
|
| device::BluetoothAdapterFactory::Shutdown();
|
| bluez::BluezDBusManager::Shutdown();
|
|
|
| + thread_manager_chrome_.reset();
|
| + thread_manager_ash_.reset();
|
| // NOTE: This must only be called if Initialize() was called.
|
| DBusThreadManager::Shutdown();
|
| }
|
|
|
| private:
|
| + //JAMES these are really bundles of clients, not thread managers
|
| + std::unique_ptr<ash::DBusThreadManagerAsh> thread_manager_ash_;
|
| + std::unique_ptr<DBusThreadManagerChrome> thread_manager_chrome_;
|
| std::unique_ptr<NetworkConnectDelegateChromeOS> network_connect_delegate_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DBusServices);
|
|
|