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

Unified Diff: ash/shell.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 | « ash/mus/window_manager_application.cc ('k') | ash/system/chromeos/power/power_event_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 728ae6a11a518958d8470ddb57df09556d6883f7..13fadcdecfeb885d42a6ef3421f9b27e9dcdcc17 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -115,6 +115,7 @@
#include "ash/accelerators/magnifier_key_scroller.h"
#include "ash/accelerators/spoken_feedback_toggler.h"
#include "ash/common/ash_constants.h"
+#include "ash/common/dbus_thread_manager_ash.h"
#include "ash/common/system/chromeos/bluetooth/bluetooth_notification_controller.h"
#include "ash/common/system/chromeos/power/power_status.h"
#include "ash/display/display_change_observer_chromeos.h"
@@ -503,6 +504,7 @@ Shell::Shell(ShellDelegate* delegate)
user_metrics_recorder_.reset(new UserMetricsRecorder);
#if defined(OS_CHROMEOS)
+ DCHECK(DBusThreadManagerAsh::Get());
PowerStatus::Initialize();
#endif
}
@@ -665,7 +667,8 @@ Shell::~Shell() {
PowerStatus::Shutdown();
// Ensure that DBusThreadManager outlives this Shell.
- DCHECK(chromeos::DBusThreadManager::IsInitialized());
+ // DCHECK(chromeos::DBusThreadManager::IsInitialized());
+ DCHECK(DBusThreadManagerAsh::Get());//IsInitialized?
#endif
// Needs to happen right before |instance_| is reset.
@@ -725,10 +728,8 @@ void Shell::Init(const ShellInitParams& init_params) {
}
// The DBusThreadManager must outlive this Shell. See the DCHECK in ~Shell.
- chromeos::DBusThreadManager* dbus_thread_manager =
- chromeos::DBusThreadManager::Get();
- projecting_observer_.reset(
- new ProjectingObserver(dbus_thread_manager->GetPowerManagerClient()));
+ projecting_observer_.reset(new ProjectingObserver(
+ DBusThreadManagerAsh::Get()->GetPowerManagerClient()));
display_configurator_->AddObserver(projecting_observer_.get());
wm_shell_->AddShellObserver(projecting_observer_.get());
« no previous file with comments | « ash/mus/window_manager_application.cc ('k') | ash/system/chromeos/power/power_event_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698