OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef NET_TEST_TEST_SERVER_H_ | 5 #ifndef NET_TEST_TEST_SERVER_H_ |
6 #define NET_TEST_TEST_SERVER_H_ | 6 #define NET_TEST_TEST_SERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
| 15 #include "base/file_util.h" |
15 #include "base/process_util.h" | 16 #include "base/process_util.h" |
16 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
17 | 18 |
18 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
19 #include "base/scoped_handle_win.h" | 20 #include "base/scoped_handle_win.h" |
20 #endif | 21 #endif |
21 | 22 |
22 #if defined(USE_NSS) | 23 #if defined(USE_NSS) |
23 #include "base/ref_counted.h" | 24 #include "base/ref_counted.h" |
24 #include "net/base/x509_certificate.h" | 25 #include "net/base/x509_certificate.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 103 |
103 // Address the test server listens on. | 104 // Address the test server listens on. |
104 HostPortPair host_port_pair_; | 105 HostPortPair host_port_pair_; |
105 | 106 |
106 // Handle of the Python process running the test server. | 107 // Handle of the Python process running the test server. |
107 base::ProcessHandle process_handle_; | 108 base::ProcessHandle process_handle_; |
108 | 109 |
109 #if defined(OS_WIN) | 110 #if defined(OS_WIN) |
110 // JobObject used to clean up orphaned child processes. | 111 // JobObject used to clean up orphaned child processes. |
111 ScopedHandle job_handle_; | 112 ScopedHandle job_handle_; |
| 113 |
| 114 // The file handle the child writes to when it starts. |
| 115 ScopedHandle child_fd_; |
| 116 #endif |
| 117 |
| 118 #if defined(OS_POSIX) |
| 119 // The file descriptor the child writes to when it starts. |
| 120 int child_fd_; |
| 121 file_util::ScopedFD child_fd_closer_; |
112 #endif | 122 #endif |
113 | 123 |
114 #if defined(USE_NSS) | 124 #if defined(USE_NSS) |
115 scoped_refptr<X509Certificate> cert_; | 125 scoped_refptr<X509Certificate> cert_; |
116 #endif | 126 #endif |
117 | 127 |
118 Type type_; | 128 Type type_; |
119 | 129 |
120 DISALLOW_COPY_AND_ASSIGN(TestServer); | 130 DISALLOW_COPY_AND_ASSIGN(TestServer); |
121 }; | 131 }; |
122 | 132 |
123 } // namespace net | 133 } // namespace net |
124 | 134 |
125 #endif // NET_TEST_TEST_SERVER_H_ | 135 #endif // NET_TEST_TEST_SERVER_H_ |
OLD | NEW |