This source file includes following definitions.
- GetFieldTrialFullName
- RegisterFieldTrialHelper
#include "chrome/browser/android/field_trial_helper.h"
#include <jni.h>
#include "base/android/jni_string.h"
#include "base/metrics/field_trial.h"
#include "jni/FieldTrialHelper_jni.h"
using base::android::ConvertJavaStringToUTF8;
using base::android::ConvertUTF8ToJavaString;
static jstring GetFieldTrialFullName(JNIEnv* env,
jclass clazz,
jstring jtrial_name) {
std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name));
return ConvertUTF8ToJavaString(
env,
base::FieldTrialList::FindFullName(trial_name)).Release();
}
namespace chrome {
namespace android {
bool RegisterFieldTrialHelper(JNIEnv* env) {
return RegisterNativesImpl(env);
}
}
}