| Index: third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp
|
| diff --git a/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp b/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp
|
| index 4d211c04e70bc8cabc4f3e8549b5a2c931416a5d..85d04cc4e98b8f99bc7fe01144e71ad6aca45cc4 100644
|
| --- a/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp
|
| +++ b/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp
|
| @@ -12,6 +12,8 @@
|
| #include "core/workers/WorkerThread.h"
|
| #include "public/platform/InterfaceProvider.h"
|
| #include "public/platform/Platform.h"
|
| +#include "services/device/public/cpp/constants.h"
|
| +#include "services/service_manager/public/cpp/connector.h"
|
| #include "third_party/icu/source/i18n/unicode/timezone.h"
|
| #include <v8.h>
|
|
|
| @@ -33,11 +35,16 @@ void NotifyTimezoneChangeOnWorkerThread(ExecutionContext* context) {
|
|
|
| // static
|
| void TimeZoneMonitorClient::Init() {
|
| + if (!Platform::current()->serviceConnector())
|
| + return;
|
| +
|
| DEFINE_STATIC_LOCAL(TimeZoneMonitorClient, instance, ());
|
|
|
| device::mojom::blink::TimeZoneMonitorPtr monitor;
|
| - Platform::current()->interfaceProvider()->getInterface(
|
| - mojo::GetProxy(&monitor));
|
| + std::unique_ptr<service_manager::Connection> deviceService =
|
| + Platform::current()->serviceConnector()->Connect(
|
| + device::kDeviceServiceName);
|
| + deviceService->GetInterface(mojo::GetProxy(&monitor));
|
| monitor->AddClient(instance.m_binding.CreateInterfacePtrAndBind());
|
| }
|
|
|
|
|