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

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: remove unused Java native method + fix comment Created 7 years, 11 months 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
« no previous file with comments | « base/base.gypi ('k') | content/content_app.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6316ab8f7f78fb880e5b81efd02aacfcf5f91344 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>
+
#include "base/android/jni_array.h"
#include "base/logging.h"
#include "base/posix/global_descriptors.h"
@@ -60,7 +62,11 @@ void InternalInitSandboxedProcess(const std::vector<int>& file_ids,
JNIEnv* env,
jclass clazz,
jobject context,
- jobject service) {
+ jobject service,
+ jint cpu_count,
+ jlong cpu_features) {
+ // 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 +92,17 @@ void InitSandboxedProcess(JNIEnv* env,
jobject context,
jobject service,
jintArray j_file_ids,
- jintArray j_file_fds) {
+ jintArray j_file_fds,
+ jint cpu_count,
+ jlong cpu_features) {
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,
+ cpu_count, cpu_features);
}
void ExitSandboxedProcess(JNIEnv* env, jclass clazz) {
« no previous file with comments | « base/base.gypi ('k') | content/content_app.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698