| Index: components/gcm_driver/instance_id/instance_id_test_utils_android.cc
|
| diff --git a/components/gcm_driver/instance_id/instance_id_test_utils_android.cc b/components/gcm_driver/instance_id/instance_id_test_utils_android.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..148c56f710e963c24d8a531b57041a7563a05e56
|
| --- /dev/null
|
| +++ b/components/gcm_driver/instance_id/instance_id_test_utils_android.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/instance_id_test_utils_android.h"
|
| +
|
| +#include "base/android/jni_android.h"
|
| +#include "jni/FakeInstanceIDWithSubtype_jni.h"
|
| +
|
| +using base::android::AttachCurrentThread;
|
| +
|
| +namespace instance_id {
|
| +
|
| +// static
|
| +bool InstanceIDTestUtilsAndroid::RegisterJni(JNIEnv* env) {
|
| + return RegisterNativesImpl(env);
|
| +}
|
| +
|
| +// static
|
| +void InstanceIDTestUtilsAndroid::ClearDataAndSetUseFakeForTesting(
|
| + bool use_fake) {
|
| + JNIEnv* env = AttachCurrentThread();
|
| + Java_FakeInstanceIDWithSubtype_clearDataAndSetEnabled(env, use_fake);
|
| +}
|
| +
|
| +} // namespace instance_id
|
|
|