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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java

Issue 2795113003: Factor out inner-classes out of ChildProcessLauncher. (Closed)
Patch Set: Addressed boliu@'s comments. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.ParcelFileDescriptor; 8 import android.os.ParcelFileDescriptor;
9 9
10 import org.chromium.base.ContextUtils; 10 import org.chromium.base.ContextUtils;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // Called on UI thread. 95 // Called on UI thread.
96 @CalledByNative 96 @CalledByNative
97 private static int getNumberOfRendererSlots() { 97 private static int getNumberOfRendererSlots() {
98 final ChildProcessCreationParams params = ChildProcessCreationParams.get Default(); 98 final ChildProcessCreationParams params = ChildProcessCreationParams.get Default();
99 final Context context = ContextUtils.getApplicationContext(); 99 final Context context = ContextUtils.getApplicationContext();
100 final boolean inSandbox = true; 100 final boolean inSandbox = true;
101 final String packageName = 101 final String packageName =
102 params == null ? context.getPackageName() : params.getPackageNam e(); 102 params == null ? context.getPackageName() : params.getPackageNam e();
103 try { 103 try {
104 return ChildProcessLauncher.getNumberOfServices(context, inSandbox, packageName); 104 return ChildConnectionAllocator.getNumberOfServices(context, inSandb ox, packageName);
105 } catch (RuntimeException e) { 105 } catch (RuntimeException e) {
106 // Unittest packages do not declare services. Some tests require a r ealistic number 106 // Unittest packages do not declare services. Some tests require a r ealistic number
107 // to test child process policies, so pick a high-ish number here. 107 // to test child process policies, so pick a high-ish number here.
108 return 65535; 108 return 65535;
109 } 109 }
110 } 110 }
111 111
112 // Can be called on a number of threads, including launcher, and binder. 112 // Can be called on a number of threads, including launcher, and binder.
113 private static native void nativeOnChildProcessStarted( 113 private static native void nativeOnChildProcessStarted(
114 long nativeChildProcessLauncherHelper, int pid); 114 long nativeChildProcessLauncherHelper, int pid);
115 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698