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

Side by Side Diff: content/public/test/android/javatests/src/org/chromium/content/browser/test/ChildProcessAllocatorSettingsHook.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
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.test; 5 package org.chromium.content.browser.test;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.base.test.BaseTestResult.PreTestHook; 9 import org.chromium.base.test.BaseTestResult.PreTestHook;
10 import org.chromium.content.browser.ChildProcessLauncher; 10 import org.chromium.content.browser.ChildConnectionAllocator;
11 11
12 import java.lang.reflect.Method; 12 import java.lang.reflect.Method;
13 13
14 /** PreTestHook used to register the ChildProcessAllocatorSettings annotation. * / 14 /** PreTestHook used to register the ChildProcessAllocatorSettings annotation. * /
15 public final class ChildProcessAllocatorSettingsHook implements PreTestHook { 15 public final class ChildProcessAllocatorSettingsHook implements PreTestHook {
16 @Override 16 @Override
17 public void run(Context targetContext, Method testMethod) { 17 public void run(Context targetContext, Method testMethod) {
18 ChildProcessAllocatorSettings annotation = 18 ChildProcessAllocatorSettings annotation =
19 testMethod.getAnnotation(ChildProcessAllocatorSettings.class); 19 testMethod.getAnnotation(ChildProcessAllocatorSettings.class);
20 if (annotation != null) { 20 if (annotation != null) {
21 ChildProcessLauncher.setSanboxServicesSettingsForTesting( 21 ChildConnectionAllocator.setSanboxServicesSettingsForTesting(
22 annotation.sandboxedServiceCount(), annotation.sandboxedServ iceName()); 22 annotation.sandboxedServiceCount(), annotation.sandboxedServ iceName());
23 } 23 }
24 } 24 }
25 } 25 }
OLDNEW
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698