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

Unified Diff: services/device/device_service.cc

Issue 2729293002: Fix renderers not getting power broadcast messages (Closed)
Patch Set: Created 3 years, 10 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 | « services/device/device_service.h ('k') | services/device/power_monitor/power_monitor_message_broadcaster.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/device/device_service.cc
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
index f51d5a922e3a6299e84254a1f03144dee9c8e986..0044460a1d9c1dd4bb4d99313ae24f2582b861bb 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -55,7 +55,11 @@ void DeviceService::Create(const service_manager::Identity& remote_identity,
void DeviceService::Create(const service_manager::Identity& remote_identity,
mojom::PowerMonitorRequest request) {
- PowerMonitorMessageBroadcaster::Create(std::move(request));
+ if (!power_monitor_message_broadcaster_) {
+ power_monitor_message_broadcaster_ =
+ base::MakeUnique<PowerMonitorMessageBroadcaster>();
+ }
+ power_monitor_message_broadcaster_->Bind(std::move(request));
}
void DeviceService::Create(const service_manager::Identity& remote_identity,
« no previous file with comments | « services/device/device_service.h ('k') | services/device/power_monitor/power_monitor_message_broadcaster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698