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

Unified Diff: base/android/cpu_features.cc

Issue 11503013: android: Pass CPU properties from browser to renderer process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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: 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..b6e0156220a3be2d1fa3f70c1573301abb9406f4
--- /dev/null
+++ b/base/android/cpu_features.cc
@@ -0,0 +1,26 @@
+#include <cpu-features.h>
bulach 2012/12/10 14:03:07 nit: copyright notice
digit1 2012/12/10 14:44:56 Done.
+
+#include "base/android/jni_android.h"
+#include "jni/CpuFeatures_jni.h"
+
+namespace base {
+namespace android {
+
+jint GetCoreCount(JNIEnv*, jclass) {
+ return android_getCpuCount();
bulach 2012/12/10 14:03:07 nit: the indentation seems off here and the two ca
digit1 2012/12/10 14:44:56 Done.
+}
+
+jlong GetCpuFeatures(JNIEnv*, jclass) {
+ return android_getCpuFeatures();
+}
+
+void SetCpu(JNIEnv*, jclass, jint cpuCount, jlong cpuFeatures) {
bulach 2012/12/10 14:03:07 nit: hacker_style for cpu_count and cpu_features
digit1 2012/12/10 14:44:56 Done.
+ android_setCpu(cpuCount, cpuFeatures);
+}
+
+bool RegisterCpuFeatures(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+} // namespace android
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698