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

Side by Side Diff: components/cronet/android/test/src/org/chromium/net/QuicTestServer.java

Issue 1039693003: [Cronet] Add support to run quic_simple_server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Suppress fb warning Created 5 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.net;
6
7 import android.content.Context;
8
9 import org.chromium.base.JNINamespace;
10
11 /**
12 * Wrapper class to start a Quic test server.
13 */
14 @JNINamespace("cronet")
15 public final class QuicTestServer {
16 public static void startQuicTestServer(Context context) {
17 nativeStartQuicTestServer(TestFilesInstaller.getInstalledPath(context));
18 }
19
20 public static void shutdownQuicTestServer() {
21 nativeShutdownQuicTestServer();
22 }
23
24 public static String getServerURL() {
25 return "http://" + getServerHost() + ":" + getServerPort();
26 }
27
28 public static String getServerHost() {
29 return nativeGetServerHost();
30 }
31
32 public static int getServerPort() {
33 return nativeGetServerPort();
34 }
35
36 private static native void nativeStartQuicTestServer(String filePath);
37 private static native void nativeShutdownQuicTestServer();
38 private static native String nativeGetServerHost();
39 private static native int nativeGetServerPort();
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698