OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ | 5 #ifndef NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ |
6 #define NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ | 6 #define NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
250 return type == BaseTestServer::TYPE_HTTPS || | 250 return type == BaseTestServer::TYPE_HTTPS || |
251 type == BaseTestServer::TYPE_WSS; | 251 type == BaseTestServer::TYPE_WSS; |
252 } | 252 } |
253 | 253 |
254 // Enable HTTP basic authentication. Currently this only works for TYPE_WS and | 254 // Enable HTTP basic authentication. Currently this only works for TYPE_WS and |
255 // TYPE_WSS. | 255 // TYPE_WSS. |
256 void set_websocket_basic_auth(bool ws_basic_auth) { | 256 void set_websocket_basic_auth(bool ws_basic_auth) { |
257 ws_basic_auth_ = ws_basic_auth; | 257 ws_basic_auth_ = ws_basic_auth; |
258 } | 258 } |
259 | 259 |
260 void set_ssl_options(const SSLOptions& ssl_options); | |
Ryan Sleevi
2015/04/03 00:21:12
Drive by not-LGTM on these. TBH, I'm surprised 254
jww
2015/04/08 00:57:40
Gone.
| |
261 | |
260 protected: | 262 protected: |
261 virtual ~BaseTestServer(); | 263 virtual ~BaseTestServer(); |
262 Type type() const { return type_; } | 264 Type type() const { return type_; } |
263 | 265 |
264 // Gets port currently assigned to host_port_pair_ without checking | 266 // Gets port currently assigned to host_port_pair_ without checking |
265 // whether it's available (server started) or not. | 267 // whether it's available (server started) or not. |
266 uint16 GetPort(); | 268 uint16 GetPort(); |
267 | 269 |
268 // Sets |port| as the actual port used by Python based test server. | 270 // Sets |port| as the actual port used by Python based test server. |
269 void SetPort(uint16 port); | 271 void SetPort(uint16 port); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
327 bool ws_basic_auth_; | 329 bool ws_basic_auth_; |
328 | 330 |
329 scoped_ptr<ScopedPortException> allowed_port_; | 331 scoped_ptr<ScopedPortException> allowed_port_; |
330 | 332 |
331 DISALLOW_COPY_AND_ASSIGN(BaseTestServer); | 333 DISALLOW_COPY_AND_ASSIGN(BaseTestServer); |
332 }; | 334 }; |
333 | 335 |
334 } // namespace net | 336 } // namespace net |
335 | 337 |
336 #endif // NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ | 338 #endif // NET_TEST_SPAWNED_TEST_SERVER_BASE_TEST_SERVER_H_ |
OLD | NEW |