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

Unified Diff: components/gcm_driver/instance_id/android/component_jni_registrar.cc

Issue 1830983002: Implement InstanceIDAndroid using InstanceIDWithSubtype.java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid1subtype
Patch Set: Improve comments Created 4 years, 8 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: components/gcm_driver/instance_id/android/component_jni_registrar.cc
diff --git a/components/gcm_driver/instance_id/android/component_jni_registrar.cc b/components/gcm_driver/instance_id/android/component_jni_registrar.cc
new file mode 100644
index 0000000000000000000000000000000000000000..de6705bb8ce8860bc47389630ac5c6e0febf8041
--- /dev/null
+++ b/components/gcm_driver/instance_id/android/component_jni_registrar.cc
@@ -0,0 +1,26 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/gcm_driver/instance_id/android/component_jni_registrar.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "base/macros.h"
+#include "components/gcm_driver/instance_id/instance_id_android.h"
+
+namespace instance_id {
+namespace android {
+
+static base::android::RegistrationMethod kInstanceIDRegisteredMethods[] = {
+ {"InstanceID", instance_id::InstanceIDAndroid::RegisterJni},
+};
+
+bool RegisterInstanceIDJni(JNIEnv* env) {
+ return base::android::RegisterNativeMethods(
+ env, kInstanceIDRegisteredMethods,
+ arraysize(kInstanceIDRegisteredMethods));
+}
+
+} // namespace android
+} // namespace instance_id

Powered by Google App Engine
This is Rietveld 408576698