#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/test_support_jni_headers/ThreadPoolTestHelpers_jni.h"
namespace base {
class ThreadPoolTestHelpers {
public:
static void BeginFenceForTesting();
static void EndFenceForTesting();
};
void ThreadPoolTestHelpers::BeginFenceForTesting() {
ThreadPoolInstance::Get()->BeginFence();
}
void ThreadPoolTestHelpers::EndFenceForTesting() {
ThreadPoolInstance::Get()->EndFence();
}
}
void JNI_ThreadPoolTestHelpers_EnableThreadPoolExecutionForTesting(
JNIEnv* env) {
base::ThreadPoolTestHelpers::EndFenceForTesting();
}
void JNI_ThreadPoolTestHelpers_DisableThreadPoolExecutionForTesting(
JNIEnv* env) {
base::ThreadPoolTestHelpers::BeginFenceForTesting();
}