| Index: content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/SandboxedProcessConnection.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java
|
| similarity index 91%
|
| rename from content/public/android/java/src/org/chromium/content/browser/SandboxedProcessConnection.java
|
| rename to content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java
|
| index 53d531827e8fbec81637440597078096f1c86b80..c6043a483e5e1b02bdaf8a4150a67541ef73aa5a 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/SandboxedProcessConnection.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java
|
| @@ -23,13 +23,13 @@ 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;
|
| -import org.chromium.content.common.ISandboxedProcessService;
|
| +import org.chromium.content.common.IChildProcessCallback;
|
| +import org.chromium.content.common.IChildProcessService;
|
| import org.chromium.content.common.TraceEvent;
|
|
|
| -public class SandboxedProcessConnection implements ServiceConnection {
|
| +public class ChildProcessConnection implements ServiceConnection {
|
| interface DeathCallback {
|
| - void onSandboxedProcessDied(int pid);
|
| + void onChildProcessDied(int pid);
|
| }
|
|
|
| // Names of items placed in the bind intent or connection bundle.
|
| @@ -52,30 +52,30 @@ public class SandboxedProcessConnection implements ServiceConnection {
|
|
|
| private final Context mContext;
|
| private final int mServiceNumber;
|
| - private final SandboxedProcessConnection.DeathCallback mDeathCallback;
|
| + private final ChildProcessConnection.DeathCallback mDeathCallback;
|
|
|
| // Synchronization: While most internal flow occurs on the UI thread, the public API
|
| // (specifically bind and unbind) may be called from any thread, hence all entry point methods
|
| - // into the class are synchronized on the SandboxedProcessConnection instance to protect access
|
| + // into the class are synchronized on the ChildProcessConnection instance to protect access
|
| // to these members. But see also the TODO where AsyncBoundServiceConnection is created.
|
| - private ISandboxedProcessService mService = null;
|
| + private IChildProcessService mService = null;
|
| private boolean mServiceConnectComplete = false;
|
| private int mPID = 0; // Process ID of the corresponding sandboxed process.
|
| private HighPriorityConnection mHighPriorityConnection = null;
|
| private int mHighPriorityConnectionCount = 0;
|
|
|
| - private static final String TAG = "SandboxedProcessConnection";
|
| + private static final String TAG = "ChildProcessConnection";
|
|
|
| private static class ConnectionParams {
|
| final String[] mCommandLine;
|
| final FileDescriptorInfo[] mFilesToBeMapped;
|
| - final ISandboxedProcessCallback mCallback;
|
| + final IChildProcessCallback mCallback;
|
| final Runnable mOnConnectionCallback;
|
|
|
| ConnectionParams(
|
| String[] commandLine,
|
| FileDescriptorInfo[] filesToBeMapped,
|
| - ISandboxedProcessCallback callback,
|
| + IChildProcessCallback callback,
|
| Runnable onConnectionCallback) {
|
| mCommandLine = commandLine;
|
| mFilesToBeMapped = filesToBeMapped;
|
| @@ -88,8 +88,8 @@ public class SandboxedProcessConnection implements ServiceConnection {
|
| private ConnectionParams mConnectionParams;
|
| private boolean mIsBound;
|
|
|
| - SandboxedProcessConnection(Context context, int number,
|
| - SandboxedProcessConnection.DeathCallback deathCallback) {
|
| + ChildProcessConnection(Context context, int number,
|
| + ChildProcessConnection.DeathCallback deathCallback) {
|
| mContext = context;
|
| mServiceNumber = number;
|
| mDeathCallback = deathCallback;
|
| @@ -99,7 +99,7 @@ public class SandboxedProcessConnection implements ServiceConnection {
|
| return mServiceNumber;
|
| }
|
|
|
| - synchronized ISandboxedProcessService getService() {
|
| + synchronized IChildProcessService getService() {
|
| return mService;
|
| }
|
|
|
| @@ -112,7 +112,7 @@ public class SandboxedProcessConnection implements ServiceConnection {
|
| }
|
|
|
| /**
|
| - * Bind to an ISandboxedProcessService. This must be followed by a call to setupConnection()
|
| + * Bind to an IChildProcessService. This must be followed by a call to setupConnection()
|
| * to setup the connection parameters. (These methods are separated to allow the client
|
| * to pass whatever parameters they have available here, and complete the remainder
|
| * later while reducing the connection setup latency).
|
| @@ -150,7 +150,7 @@ public class SandboxedProcessConnection implements ServiceConnection {
|
| synchronized void setupConnection(
|
| String[] commandLine,
|
| FileDescriptorInfo[] filesToBeMapped,
|
| - ISandboxedProcessCallback callback,
|
| + IChildProcessCallback callback,
|
| Runnable onConnectionCallback) {
|
| TraceEvent.begin();
|
| assert mConnectionParams == null;
|
| @@ -163,7 +163,7 @@ public class SandboxedProcessConnection implements ServiceConnection {
|
| }
|
|
|
| /**
|
| - * Unbind the ISandboxedProcessService. It is safe to call this multiple times.
|
| + * Unbind the IChildProcessService. It is safe to call this multiple times.
|
| */
|
| synchronized void unbind() {
|
| if (mIsBound) {
|
| @@ -186,7 +186,7 @@ public class SandboxedProcessConnection implements ServiceConnection {
|
| public void onServiceConnected(ComponentName className, IBinder service) {
|
| TraceEvent.begin();
|
| mServiceConnectComplete = true;
|
| - mService = ISandboxedProcessService.Stub.asInterface(service);
|
| + mService = IChildProcessService.Stub.asInterface(service);
|
| if (mConnectionParams != null) {
|
| doConnectionSetup();
|
| }
|
| @@ -279,7 +279,7 @@ public class SandboxedProcessConnection implements ServiceConnection {
|
| Log.w(TAG, "onServiceDisconnected (crash?): pid=" + pid);
|
| unbind(); // We don't want to auto-restart on crash. Let the browser do that.
|
| if (pid != 0) {
|
| - mDeathCallback.onSandboxedProcessDied(pid);
|
| + mDeathCallback.onChildProcessDied(pid);
|
| }
|
| if (onConnectionCallback != null) {
|
| onConnectionCallback.run();
|
|
|