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

Unified Diff: ash/common/system/chromeos/brightness/tray_brightness.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
Index: ash/common/system/chromeos/brightness/tray_brightness.cc
diff --git a/ash/common/system/chromeos/brightness/tray_brightness.cc b/ash/common/system/chromeos/brightness/tray_brightness.cc
index 88b66723dd6b27205652c7426bb5d28140caf252..aea2cf876b9f0c9c4f7749c909d1eded8fc0dd2b 100644
--- a/ash/common/system/chromeos/brightness/tray_brightness.cc
+++ b/ash/common/system/chromeos/brightness/tray_brightness.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "ash/common/ash_constants.h"
+#include "ash/common/dbus_thread_manager_ash.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shell_observer.h"
#include "ash/common/system/brightness_control_delegate.h"
@@ -19,7 +20,7 @@
#include "base/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
+// #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_manager_client.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
@@ -189,12 +190,12 @@ TrayBrightness::TrayBrightness(SystemTray* system_tray)
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&TrayBrightness::GetInitialBrightness,
weak_ptr_factory_.GetWeakPtr()));
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(
+ DBusThreadManagerAsh::Get()->GetPowerManagerClient()->AddObserver(
this);
}
TrayBrightness::~TrayBrightness() {
- chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(
+ DBusThreadManagerAsh::Get()->GetPowerManagerClient()->RemoveObserver(
this);
}

Powered by Google App Engine
This is Rietveld 408576698