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

Unified Diff: content/app/android/sandboxed_process_service.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: content/app/android/sandboxed_process_service.cc
diff --git a/content/app/android/sandboxed_process_service.cc b/content/app/android/sandboxed_process_service.cc
index ea3db5578f68fb274c4cac276b2bf78cc04046e0..4ce11cb9b3f5c4c9911d2f9d4827472ef45d6e4c 100644
--- a/content/app/android/sandboxed_process_service.cc
+++ b/content/app/android/sandboxed_process_service.cc
@@ -4,6 +4,8 @@
#include "content/app/android/sandboxed_process_service.h"
+#include <cpu-features.h>
+#
bulach 2012/12/10 14:03:07 nit: spurious #
digit1 2012/12/10 14:44:56 Done.
#include "base/android/jni_array.h"
#include "base/logging.h"
#include "base/posix/global_descriptors.h"
@@ -60,7 +62,12 @@ void InternalInitSandboxedProcess(const std::vector<int>& file_ids,
JNIEnv* env,
jclass clazz,
jobject context,
- jobject service) {
+ jobject service,
+ jint cpu_count,
+ jlong cpu_features
+ ) {
bulach 2012/12/10 14:03:07 nit: move this ) { one line up
digit1 2012/12/10 14:44:56 Done.
+ // Set the CPU properties.
+ android_setCpu(cpu_count, cpu_features);
// Register the file descriptors.
// This includes the IPC channel, the crash dump signals and resource related
// files.
@@ -86,14 +93,18 @@ void InitSandboxedProcess(JNIEnv* env,
jobject context,
jobject service,
jintArray j_file_ids,
- jintArray j_file_fds) {
+ jintArray j_file_fds,
+ jint cpuCount,
+ jlong cpuFeatures
+ ) {
bulach 2012/12/10 14:03:07 nit: nit: move this ) { one line up. also, hacker_
digit1 2012/12/10 14:44:56 Done.
std::vector<int> file_ids;
std::vector<int> file_fds;
JavaIntArrayToIntVector(env, j_file_ids, &file_ids);
JavaIntArrayToIntVector(env, j_file_fds, &file_fds);
InternalInitSandboxedProcess(
- file_ids, file_fds, env, clazz, context, service);
+ file_ids, file_fds, env, clazz, context, service,
+ cpuCount, cpuFeatures);
}
void ExitSandboxedProcess(JNIEnv* env, jclass clazz) {

Powered by Google App Engine
This is Rietveld 408576698