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/cronet/ios/test/quic_test_server.h" | 5 #include "components/cronet/ios/test/quic_test_server.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "net/base/ip_address.h" | 13 #include "net/base/ip_address.h" |
14 #include "net/base/ip_endpoint.h" | 14 #include "net/base/ip_endpoint.h" |
15 #include "net/base/test_data_directory.h" | |
16 #include "net/quic/crypto/proof_source_chromium.h" | 15 #include "net/quic/crypto/proof_source_chromium.h" |
17 #include "net/spdy/spdy_header_block.h" | 16 #include "net/spdy/spdy_header_block.h" |
| 17 #include "net/test/test_data_directory.h" |
18 #include "net/tools/quic/quic_in_memory_cache.h" | 18 #include "net/tools/quic/quic_in_memory_cache.h" |
19 #include "net/tools/quic/quic_simple_server.h" | 19 #include "net/tools/quic/quic_simple_server.h" |
20 | 20 |
21 namespace cronet { | 21 namespace cronet { |
22 | 22 |
23 // This must match the certificate used (quic_test.example.com.crt and | 23 // This must match the certificate used (quic_test.example.com.crt and |
24 // quic_test.example.com.key.pkcs8). | 24 // quic_test.example.com.key.pkcs8). |
25 const char kTestServerDomain[] = "test.example.com"; | 25 const char kTestServerDomain[] = "test.example.com"; |
26 const int kTestServerPort = 6121; | 26 const int kTestServerPort = 6121; |
27 const char kTestServerHost[] = "test.example.com:6121"; | 27 const char kTestServerHost[] = "test.example.com:6121"; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 base::WaitableEvent::ResetPolicy::MANUAL, | 122 base::WaitableEvent::ResetPolicy::MANUAL, |
123 base::WaitableEvent::InitialState::NOT_SIGNALED); | 123 base::WaitableEvent::InitialState::NOT_SIGNALED); |
124 g_quic_server_thread->task_runner()->PostTask( | 124 g_quic_server_thread->task_runner()->PostTask( |
125 FROM_HERE, base::Bind(&ShutdownOnServerThread, &server_stopped_event)); | 125 FROM_HERE, base::Bind(&ShutdownOnServerThread, &server_stopped_event)); |
126 server_stopped_event.Wait(); | 126 server_stopped_event.Wait(); |
127 delete g_quic_server_thread; | 127 delete g_quic_server_thread; |
128 g_quic_server_thread = nullptr; | 128 g_quic_server_thread = nullptr; |
129 } | 129 } |
130 | 130 |
131 } // namespace cronet | 131 } // namespace cronet |
OLD | NEW |