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

Unified Diff: components/gcm_driver/instance_id/instance_id_android.cc

Issue 1829023002: Add fake for InstanceIDWithSubtype.java, in order to re-use unit test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid2jni
Patch Set: Tweaks 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/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 29e4629f6025d6bd82f6bfda9130ddf94a72a51d..3a72b0865ee691c08d463dafd7f65a0db831722c 100644
--- a/components/gcm_driver/instance_id/instance_id_android.cc
+++ b/components/gcm_driver/instance_id/instance_id_android.cc
@@ -27,6 +27,12 @@ bool InstanceIDAndroid::RegisterBindings(JNIEnv* env) {
}
// static
+void InstanceIDAndroid::ClearDataAndSetUseFakeForTesting(bool use_fake) {
+ JNIEnv* env = AttachCurrentThread();
+ Java_InstanceIDWithSubtype_clearDataAndSetUseFakeForTesting(env, use_fake);
+}
+
+// static
scoped_ptr<InstanceID> InstanceID::Create(const std::string& app_id,
gcm::InstanceIDHandler* unused) {
return make_scoped_ptr(new InstanceIDAndroid(app_id));

Powered by Google App Engine
This is Rietveld 408576698