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

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

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 years, 1 month 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 | « no previous file | net/data/ssl/certificates/quic_test.example.com.key.sct » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 net::QuicConfig config; 43 net::QuicConfig config;
44 44
45 // Set up server certs. 45 // Set up server certs.
46 base::FilePath directory; 46 base::FilePath directory;
47 CHECK(base::android::GetExternalStorageDirectory(&directory)); 47 CHECK(base::android::GetExternalStorageDirectory(&directory));
48 directory = directory.Append("net/data/ssl/certificates"); 48 directory = directory.Append("net/data/ssl/certificates");
49 // TODO(xunjieli): Use scoped_ptr when crbug.com/545474 is fixed. 49 // TODO(xunjieli): Use scoped_ptr when crbug.com/545474 is fixed.
50 net::ProofSourceChromium* proof_source = new net::ProofSourceChromium(); 50 net::ProofSourceChromium* proof_source = new net::ProofSourceChromium();
51 CHECK(proof_source->Initialize( 51 CHECK(proof_source->Initialize(
52 directory.Append("quic_test.example.com.crt"), 52 directory.Append("quic_test.example.com.crt"),
53 directory.Append("quic_test.example.com.key.pkcs8"))); 53 directory.Append("quic_test.example.com.key.pkcs8"),
54 directory.Append("quic_test.example.com.key.sct")));
54 g_quic_server = new net::tools::QuicSimpleServer( 55 g_quic_server = new net::tools::QuicSimpleServer(
55 proof_source, config, net::QuicSupportedVersions()); 56 proof_source, config, net::QuicSupportedVersions());
56 57
57 // Start listening. 58 // Start listening.
58 int rv = g_quic_server->Listen(net::IPEndPoint(ip, kServerPort)); 59 int rv = g_quic_server->Listen(net::IPEndPoint(ip, kServerPort));
59 CHECK_GE(rv, 0) << "Quic server fails to start"; 60 CHECK_GE(rv, 0) << "Quic server fails to start";
60 JNIEnv* env = base::android::AttachCurrentThread(); 61 JNIEnv* env = base::android::AttachCurrentThread();
61 Java_QuicTestServer_onServerStarted(env); 62 Java_QuicTestServer_onServerStarted(env);
62 } 63 }
63 64
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 103
103 int GetServerPort(JNIEnv* env, const JavaParamRef<jclass>& /*jcaller*/) { 104 int GetServerPort(JNIEnv* env, const JavaParamRef<jclass>& /*jcaller*/) {
104 return kServerPort; 105 return kServerPort;
105 } 106 }
106 107
107 bool RegisterQuicTestServer(JNIEnv* env) { 108 bool RegisterQuicTestServer(JNIEnv* env) {
108 return RegisterNativesImpl(env); 109 return RegisterNativesImpl(env);
109 } 110 }
110 111
111 } // namespace cronet 112 } // namespace cronet
OLDNEW
« no previous file with comments | « no previous file | net/data/ssl/certificates/quic_test.example.com.key.sct » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698