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

Unified Diff: components/arc/power/arc_power_bridge.cc

Issue 1596663002: arc-bridge: Introduce the ArcService class (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Rebased + protected ArcService direct instantiation Created 4 years, 11 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 | « components/arc/power/arc_power_bridge.h ('k') | components/arc/settings/arc_settings_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/power/arc_power_bridge.cc
diff --git a/components/arc/power/arc_power_bridge.cc b/components/arc/power/arc_power_bridge.cc
index 172d8fe0a775e5db379846a36de468eec63e125e..05b438b16e950f686cfcb63aa9d699bcfb2dbdfc 100644
--- a/components/arc/power/arc_power_bridge.cc
+++ b/components/arc/power/arc_power_bridge.cc
@@ -13,15 +13,13 @@
namespace arc {
-ArcPowerBridge::ArcPowerBridge(ArcBridgeService* arc_bridge_service)
- : arc_bridge_service_(arc_bridge_service), binding_(this) {
- arc_bridge_service->AddObserver(this);
- if (arc_bridge_service->power_instance())
- OnPowerInstanceReady();
+ArcPowerBridge::ArcPowerBridge(ArcBridgeService* bridge_service)
+ : ArcService(bridge_service), binding_(this) {
+ arc_bridge_service()->AddObserver(this);
}
ArcPowerBridge::~ArcPowerBridge() {
- arc_bridge_service_->RemoveObserver(this);
+ arc_bridge_service()->RemoveObserver(this);
ReleaseAllDisplayWakeLocks();
}
@@ -31,7 +29,7 @@ void ArcPowerBridge::OnStateChanged(ArcBridgeService::State state) {
}
void ArcPowerBridge::OnPowerInstanceReady() {
- PowerInstance* power_instance = arc_bridge_service_->power_instance();
+ PowerInstance* power_instance = arc_bridge_service()->power_instance();
if (!power_instance) {
LOG(ERROR) << "OnPowerInstanceReady called, but no power instance found";
return;
« no previous file with comments | « components/arc/power/arc_power_bridge.h ('k') | components/arc/settings/arc_settings_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698