| Index: components/gcm_driver/instance_id/instance_id_android.cc
|
| diff --git a/components/gcm_driver/instance_id/instance_id_android.cc b/components/gcm_driver/instance_id/instance_id_android.cc
|
| index f2fbd212d833d84a676f69a605ef609bcdcaffe1..5d8de6dc6cbe695e9a444ea603797a498e60a3dd 100644
|
| --- a/components/gcm_driver/instance_id/instance_id_android.cc
|
| +++ b/components/gcm_driver/instance_id/instance_id_android.cc
|
| @@ -24,6 +24,19 @@ using base::android::ConvertUTF8ToJavaString;
|
|
|
| namespace instance_id {
|
|
|
| +InstanceIDAndroid::ScopedBlockOnAsyncTasksForTesting::
|
| + ScopedBlockOnAsyncTasksForTesting() {
|
| + JNIEnv* env = AttachCurrentThread();
|
| + previous_value_ =
|
| + Java_InstanceIDBridge_setBlockOnAsyncTasksForTesting(env, true);
|
| +}
|
| +
|
| +InstanceIDAndroid::ScopedBlockOnAsyncTasksForTesting::
|
| + ~ScopedBlockOnAsyncTasksForTesting() {
|
| + JNIEnv* env = AttachCurrentThread();
|
| + Java_InstanceIDBridge_setBlockOnAsyncTasksForTesting(env, previous_value_);
|
| +}
|
| +
|
| // static
|
| bool InstanceIDAndroid::RegisterJni(JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
|
|