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

Unified Diff: services/device/device_service.cc

Issue 2690963002: [DeviceService] Move //device/time_zone_monitor to //services/device (Closed)
Patch Set: Enable device service to register JNI 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/public/interfaces/BUILD.gn » ('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 4cf73987dd497d6221802f009d3b44c3f56953b6..7a225c43c71cd0408c5566605184f2d8626a7bfa 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -8,15 +8,26 @@
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "device/time_zone_monitor/time_zone_monitor.h"
#include "services/device/power_monitor/power_monitor_message_broadcaster.h"
+#include "services/device/time_zone_monitor/time_zone_monitor.h"
#include "services/service_manager/public/cpp/connection.h"
#include "services/service_manager/public/cpp/interface_registry.h"
+#if defined(OS_ANDROID)
+#include "services/device/android/register_jni.h"
+#endif
+
namespace device {
std::unique_ptr<service_manager::Service> CreateDeviceService(
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) {
+#if defined(OS_ANDROID)
+ if (!EnsureJniRegistered()) {
+ DLOG(ERROR) << "Failed to register JNI for Device Service";
+ return nullptr;
+ }
+#endif
+
return base::MakeUnique<DeviceService>(std::move(file_task_runner));
}
« no previous file with comments | « services/device/device_service.h ('k') | services/device/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698