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

Side by Side Diff: net/test/test_server.h

Issue 5519015: Explicitly whitelist the test server port. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « net/base/net_util.cc ('k') | net/test/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 (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 <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 14
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/file_path.h" 16 #include "base/file_path.h"
17 #include "base/file_util.h" 17 #include "base/file_util.h"
18 #include "base/process_util.h" 18 #include "base/process_util.h"
19 #include "net/base/host_port_pair.h" 19 #include "net/base/host_port_pair.h"
20 #include "net/base/net_util.h"
20 21
21 #if defined(OS_WIN) 22 #if defined(OS_WIN)
22 #include "base/scoped_handle_win.h" 23 #include "base/scoped_handle_win.h"
23 #endif 24 #endif
24 25
25 #if defined(USE_OPENSSL) || defined(USE_NSS) 26 #if defined(USE_OPENSSL) || defined(USE_NSS)
26 #include "base/ref_counted.h" 27 #include "base/ref_counted.h"
27 #include "net/base/x509_certificate.h" 28 #include "net/base/x509_certificate.h"
28 #endif 29 #endif
29 30
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 174
174 // Address the test server listens on. 175 // Address the test server listens on.
175 HostPortPair host_port_pair_; 176 HostPortPair host_port_pair_;
176 177
177 // Holds the data sent from the server (e.g., port number). 178 // Holds the data sent from the server (e.g., port number).
178 scoped_ptr<DictionaryValue> server_data_; 179 scoped_ptr<DictionaryValue> server_data_;
179 180
180 // Handle of the Python process running the test server. 181 // Handle of the Python process running the test server.
181 base::ProcessHandle process_handle_; 182 base::ProcessHandle process_handle_;
182 183
184 scoped_ptr<net::ScopedPortException> allowed_port_;
185
183 #if defined(OS_WIN) 186 #if defined(OS_WIN)
184 // JobObject used to clean up orphaned child processes. 187 // JobObject used to clean up orphaned child processes.
185 ScopedHandle job_handle_; 188 ScopedHandle job_handle_;
186 189
187 // The pipe file handle we read from. 190 // The pipe file handle we read from.
188 ScopedHandle child_read_fd_; 191 ScopedHandle child_read_fd_;
189 192
190 // The pipe file handle the child and we write to. 193 // The pipe file handle the child and we write to.
191 ScopedHandle child_write_fd_; 194 ScopedHandle child_write_fd_;
192 #endif 195 #endif
(...skipping 15 matching lines...) Expand all
208 211
209 // Has the server been started? 212 // Has the server been started?
210 bool started_; 213 bool started_;
211 214
212 DISALLOW_COPY_AND_ASSIGN(TestServer); 215 DISALLOW_COPY_AND_ASSIGN(TestServer);
213 }; 216 };
214 217
215 } // namespace net 218 } // namespace net
216 219
217 #endif // NET_TEST_TEST_SERVER_H_ 220 #endif // NET_TEST_TEST_SERVER_H_
OLDNEW
« no previous file with comments | « net/base/net_util.cc ('k') | net/test/test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698