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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/SandboxedProcessConnection.java

Issue 12026020: Merge 175820 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: 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 | « content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/SandboxedProcessConnection.java
===================================================================
--- content/public/android/java/src/org/chromium/content/browser/SandboxedProcessConnection.java (revision 177674)
+++ content/public/android/java/src/org/chromium/content/browser/SandboxedProcessConnection.java (working copy)
@@ -20,6 +20,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
import org.chromium.base.CalledByNative;
+import org.chromium.base.CpuFeatures;
import org.chromium.base.ThreadUtils;
import org.chromium.content.common.CommandLine;
import org.chromium.content.common.ISandboxedProcessCallback;
@@ -42,6 +43,13 @@
public static final String EXTRA_FILES_ID_SUFFIX = "_id";
public static final String EXTRA_FILES_FD_SUFFIX = "_fd";
+ // Used to pass the CPU core count to sandboxed processes.
+ public static final String EXTRA_CPU_COUNT =
+ "com.google.android.apps.chrome.extra.cpu_count";
+ // Used to pass the CPU features mask to sandboxed processes.
+ public static final String EXTRA_CPU_FEATURES =
+ "com.google.android.apps.chrome.extra.cpu_features";
+
private final Context mContext;
private final int mServiceNumber;
private final SandboxedProcessConnection.DeathCallback mDeathCallback;
@@ -237,6 +245,10 @@
bundle.putParcelable(fdName, parcelFiles[i]);
bundle.putInt(idName, fileInfos[i].mId);
}
+ // Add the CPU properties now.
+ bundle.putInt(EXTRA_CPU_COUNT, CpuFeatures.getCount());
+ bundle.putLong(EXTRA_CPU_FEATURES, CpuFeatures.getMask());
+
try {
mPID = mService.setupConnection(bundle, mConnectionParams.mCallback);
} catch (android.os.RemoteException re) {
« no previous file with comments | « content/public/android/java/src/org/chromium/content/app/SandboxedProcessService.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698