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

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

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: Address 2nd round review 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/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 a11529604142cc774d0a96cf0e208ef3e6386a97..f27a4867d48493af9f5ba74d5533e93f0255d9b1 100644
--- a/components/gcm_driver/instance_id/instance_id_android.h
+++ b/components/gcm_driver/instance_id/instance_id_android.h
@@ -27,6 +27,11 @@ class InstanceIDAndroid : public InstanceID {
// Register JNI methods.
static bool RegisterJni(JNIEnv* env);
+ // Tests depending on InstanceID that run without a nested Java message loop
+ // must enable this. Operations that would normally be asynchronous will
+ // instead block the UI thread. Reset it to false when tearing down.
+ static void SetBlockOnAsyncTasksForTesting(bool block);
+
InstanceIDAndroid(const std::string& app_id);
~InstanceIDAndroid() override;

Powered by Google App Engine
This is Rietveld 408576698