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

Side by Side Diff: components/cronet/android/test/quic_test_server.cc

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 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 | « chrome/browser/io_thread_unittest.cc ('k') | components/cronet/ios/test/quic_test_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "quic_test_server.h" 5 #include "quic_test_server.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/path_utils.h" 9 #include "base/android/path_utils.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 // Set up server certs. 48 // Set up server certs.
49 base::FilePath directory = test_data_dir.Append("net/data/ssl/certificates"); 49 base::FilePath directory = test_data_dir.Append("net/data/ssl/certificates");
50 std::unique_ptr<net::ProofSourceChromium> proof_source( 50 std::unique_ptr<net::ProofSourceChromium> proof_source(
51 new net::ProofSourceChromium()); 51 new net::ProofSourceChromium());
52 CHECK(proof_source->Initialize( 52 CHECK(proof_source->Initialize(
53 directory.Append("quic_test.example.com.crt"), 53 directory.Append("quic_test.example.com.crt"),
54 directory.Append("quic_test.example.com.key.pkcs8"), 54 directory.Append("quic_test.example.com.key.pkcs8"),
55 directory.Append("quic_test.example.com.key.sct"))); 55 directory.Append("quic_test.example.com.key.sct")));
56 g_quic_server = new net::QuicSimpleServer(std::move(proof_source), config, 56 g_quic_server = new net::QuicSimpleServer(std::move(proof_source), config,
57 net::QuicSupportedVersions()); 57 net::AllSupportedVersions());
58 58
59 // Start listening. 59 // Start listening.
60 int rv = g_quic_server->Listen( 60 int rv = g_quic_server->Listen(
61 net::IPEndPoint(net::IPAddress::IPv4AllZeros(), kServerPort)); 61 net::IPEndPoint(net::IPAddress::IPv4AllZeros(), kServerPort));
62 CHECK_GE(rv, 0) << "Quic server fails to start"; 62 CHECK_GE(rv, 0) << "Quic server fails to start";
63 JNIEnv* env = base::android::AttachCurrentThread(); 63 JNIEnv* env = base::android::AttachCurrentThread();
64 Java_QuicTestServer_onServerStarted(env); 64 Java_QuicTestServer_onServerStarted(env);
65 } 65 }
66 66
67 void ShutdownOnServerThread() { 67 void ShutdownOnServerThread() {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 int GetServerPort(JNIEnv* env, const JavaParamRef<jclass>& /*jcaller*/) { 112 int GetServerPort(JNIEnv* env, const JavaParamRef<jclass>& /*jcaller*/) {
113 return kServerPort; 113 return kServerPort;
114 } 114 }
115 115
116 bool RegisterQuicTestServer(JNIEnv* env) { 116 bool RegisterQuicTestServer(JNIEnv* env) {
117 return RegisterNativesImpl(env); 117 return RegisterNativesImpl(env);
118 } 118 }
119 119
120 } // namespace cronet 120 } // namespace cronet
OLDNEW
« no previous file with comments | « chrome/browser/io_thread_unittest.cc ('k') | components/cronet/ios/test/quic_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698