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

Unified Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 2319783002: mash: Allow a subset of D-Bus clients to be created in DBusThreadManager (Closed)
Patch Set: WIP, add DBusThreadManagerAsh and DBusThreadManagerChrome 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/dbus_thread_manager_chrome.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/dbus_thread_manager_chrome.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698