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

Unified Diff: third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc

Issue 1830883002: Add blink::ServiceRegistry and expose it from LocalFrame and Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc
diff --git a/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc b/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc
index 1d052dddaf732d20cb99c6bec5acca217d3c4538..eaa953265f088c46969ecc390a62a10659fe4307 100644
--- a/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc
+++ b/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.cc
@@ -7,6 +7,7 @@
#include "platform/battery/battery_status.h"
#include "platform/threading/BindForMojo.h"
#include "public/platform/Platform.h"
+#include "public/platform/ServiceRegistry.h"
#include "wtf/Assertions.h"
namespace blink {
@@ -20,7 +21,11 @@ BatteryDispatcherProxy::~BatteryDispatcherProxy() {}
void BatteryDispatcherProxy::StartListening() {
ASSERT(!monitor_.is_bound());
- Platform::current()->connectToRemoteService(mojo::GetProxy(&monitor_));
+ if (!Platform::current()->serviceRegistry())
esprehn 2016/03/29 05:26:20 how do we get here with a null registry? I think t
Sam McNally 2016/03/30 00:20:53 The equivalent of a null registry here would have
+ return;
+
+ Platform::current()->serviceRegistry()->connectToRemoteService(
+ mojo::GetProxy(&monitor_));
// monitor_ can be null during testing.
if (monitor_)
QueryNextStatus();

Powered by Google App Engine
This is Rietveld 408576698