OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/grpc_support/test/quic_test_server.h" | 5 #include "components/grpc_support/test/quic_test_server.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
16 #include "net/base/ip_address.h" | 16 #include "net/base/ip_address.h" |
17 #include "net/base/ip_endpoint.h" | 17 #include "net/base/ip_endpoint.h" |
18 #include "net/quic/chromium/crypto/proof_source_chromium.h" | 18 #include "net/quic/chromium/crypto/proof_source_chromium.h" |
19 #include "net/spdy/spdy_header_block.h" | 19 #include "net/spdy/core/spdy_header_block.h" |
20 #include "net/test/test_data_directory.h" | 20 #include "net/test/test_data_directory.h" |
21 #include "net/tools/quic/quic_http_response_cache.h" | 21 #include "net/tools/quic/quic_http_response_cache.h" |
22 #include "net/tools/quic/quic_simple_server.h" | 22 #include "net/tools/quic/quic_simple_server.h" |
23 | 23 |
24 namespace grpc_support { | 24 namespace grpc_support { |
25 | 25 |
26 // This must match the certificate used (quic_test.example.com.crt and | 26 // This must match the certificate used (quic_test.example.com.crt and |
27 // quic_test.example.com.key.pkcs8). | 27 // quic_test.example.com.key.pkcs8). |
28 const char kTestServerHost[] = "test.example.com"; | 28 const char kTestServerHost[] = "test.example.com"; |
29 const char kTestServerUrl[] = "https://test.example.com/hello.txt"; | 29 const char kTestServerUrl[] = "https://test.example.com/hello.txt"; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 server_stopped_event.Wait(); | 142 server_stopped_event.Wait(); |
143 delete g_quic_server_thread; | 143 delete g_quic_server_thread; |
144 g_quic_server_thread = nullptr; | 144 g_quic_server_thread = nullptr; |
145 } | 145 } |
146 | 146 |
147 int GetQuicTestServerPort() { | 147 int GetQuicTestServerPort() { |
148 return g_quic_server_port; | 148 return g_quic_server_port; |
149 } | 149 } |
150 | 150 |
151 } // namespace grpc_support | 151 } // namespace grpc_support |
OLD | NEW |