Index: base/android/cpu_features.cc |
diff --git a/base/android/cpu_features.cc b/base/android/cpu_features.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c0788f38f5fc49acc8983de7a61fd7ca272e360a |
--- /dev/null |
+++ b/base/android/cpu_features.cc |
@@ -0,0 +1,30 @@ |
+// Copyright (c) 2012 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 <cpu-features.h> |
+ |
+#include "base/android/jni_android.h" |
+#include "jni/CpuFeatures_jni.h" |
+ |
+namespace base { |
+namespace android { |
+ |
+jint GetCoreCount(JNIEnv*, jclass) { |
+ return android_getCpuCount(); |
+} |
+ |
+jlong GetCpuFeatures(JNIEnv*, jclass) { |
+ return android_getCpuFeatures(); |
+} |
+ |
+void SetCpu(JNIEnv*, jclass, jint cpu_count, jlong cpu_features) { |
+ android_setCpu(cpu_count, cpu_features); |
+} |
+ |
+bool RegisterCpuFeatures(JNIEnv* env) { |
+ return RegisterNativesImpl(env); |
+} |
+ |
+} // namespace android |
+} // namespace base |