Index: components/gcm_driver/instance_id/instance_id_android.h |
diff --git a/components/gcm_driver/instance_id/instance_id_android.h b/components/gcm_driver/instance_id/instance_id_android.h |
index c5cce21ef01f0f05d29388a860655ee8a51953be..c8e03f8cb0cbfbf8c609f984f0e34714280e7139 100644 |
--- a/components/gcm_driver/instance_id/instance_id_android.h |
+++ b/components/gcm_driver/instance_id/instance_id_android.h |
@@ -21,7 +21,8 @@ |
namespace instance_id { |
-// InstanceID implementation for Android. |
+// InstanceID implementation for Android. Callbacks other than DeleteIDCallback |
+// mustn't synchronously delete this (using InstanceIDDriver::RemoveInstanceID). |
jianli
2016/04/26 20:50:55
I don't think we want to allow synchronous deletin
johnme
2016/04/27 09:41:56
Ok, done. DeleteID no longer supports synchronous
|
class InstanceIDAndroid : public InstanceID { |
public: |
// Tests depending on InstanceID that run without a nested Java message loop |
@@ -56,6 +57,14 @@ class InstanceIDAndroid : public InstanceID { |
void DeleteID(const DeleteIDCallback& callback) override; |
// Methods called from Java via JNI: |
+ void DidGetID(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ jint request_id, |
+ const base::android::JavaParamRef<jstring>& jid); |
+ void DidGetCreationTime(JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& obj, |
+ jint request_id, |
+ jlong creation_time_unix_ms); |
void DidGetToken(JNIEnv* env, |
const base::android::JavaParamRef<jobject>& obj, |
jint request_id, |
@@ -72,6 +81,8 @@ class InstanceIDAndroid : public InstanceID { |
private: |
base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
+ IDMap<GetIDCallback, IDMapOwnPointer> get_id_callbacks_; |
+ IDMap<GetCreationTimeCallback, IDMapOwnPointer> get_creation_time_callbacks_; |
IDMap<GetTokenCallback, IDMapOwnPointer> get_token_callbacks_; |
IDMap<DeleteTokenCallback, IDMapOwnPointer> delete_token_callbacks_; |
IDMap<DeleteIDCallback, IDMapOwnPointer> delete_id_callbacks_; |