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

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

Issue 1389213003: [Cronet] Use Https for Quic Test Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ryancl
Patch Set: Address Misha's comments Created 5 years, 2 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 2015 The Chromium Authors. All rights reserved. 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 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.net; 5 package org.chromium.net;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.ConditionVariable; 8 import android.os.ConditionVariable;
9 9
10 import org.chromium.base.Log; 10 import org.chromium.base.Log;
(...skipping 13 matching lines...) Expand all
24 nativeStartQuicTestServer(TestFilesInstaller.getInstalledPath(context)); 24 nativeStartQuicTestServer(TestFilesInstaller.getInstalledPath(context));
25 sBlock.block(); 25 sBlock.block();
26 } 26 }
27 27
28 public static void shutdownQuicTestServer() { 28 public static void shutdownQuicTestServer() {
29 nativeShutdownQuicTestServer(); 29 nativeShutdownQuicTestServer();
30 sBlock.close(); 30 sBlock.close();
31 } 31 }
32 32
33 public static String getServerURL() { 33 public static String getServerURL() {
34 return "http://" + getServerHost() + ":" + getServerPort(); 34 return "https://" + getServerHost() + ":" + getServerPort();
35 } 35 }
36 36
37 public static String getServerHost() { 37 public static String getServerHost() {
38 return nativeGetServerHost(); 38 return nativeGetServerHost();
39 } 39 }
40 40
41 public static int getServerPort() { 41 public static int getServerPort() {
42 return nativeGetServerPort(); 42 return nativeGetServerPort();
43 } 43 }
44 44
45 @CalledByNative 45 @CalledByNative
46 private static void onServerStarted() { 46 private static void onServerStarted() {
47 Log.i(TAG, "Quic server started."); 47 Log.i(TAG, "Quic server started.");
48 sBlock.open(); 48 sBlock.open();
49 } 49 }
50 50
51 private static native void nativeStartQuicTestServer(String filePath); 51 private static native void nativeStartQuicTestServer(String filePath);
52 private static native void nativeShutdownQuicTestServer(); 52 private static native void nativeShutdownQuicTestServer();
53 private static native String nativeGetServerHost(); 53 private static native String nativeGetServerHost();
54 private static native int nativeGetServerPort(); 54 private static native int nativeGetServerPort();
55 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698