OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LOCAL_TEST_SERVER_H_ | 5 #ifndef NET_TEST_LOCAL_TEST_SERVER_H_ |
6 #define NET_TEST_LOCAL_TEST_SERVER_H_ | 6 #define NET_TEST_LOCAL_TEST_SERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 // |document_root| must be a relative path under the root tree. | 28 // |document_root| must be a relative path under the root tree. |
29 LocalTestServer(Type type, | 29 LocalTestServer(Type type, |
30 const std::string& host, | 30 const std::string& host, |
31 const FilePath& document_root); | 31 const FilePath& document_root); |
32 | 32 |
33 // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. | 33 // Initialize a HTTPS TestServer with a specific set of HTTPSOptions. |
34 // |document_root| must be a relative path under the root tree. | 34 // |document_root| must be a relative path under the root tree. |
35 LocalTestServer(const HTTPSOptions& https_options, | 35 LocalTestServer(const HTTPSOptions& https_options, |
36 const FilePath& document_root); | 36 const FilePath& document_root); |
37 | 37 |
38 ~LocalTestServer(); | 38 virtual ~LocalTestServer(); |
39 | 39 |
40 bool Start() WARN_UNUSED_RESULT; | 40 bool Start() WARN_UNUSED_RESULT; |
41 | 41 |
42 // Stop the server started by Start(). | 42 // Stop the server started by Start(). |
43 bool Stop(); | 43 bool Stop(); |
44 | 44 |
45 private: | 45 private: |
46 bool Init(const FilePath& document_root); | 46 bool Init(const FilePath& document_root); |
47 | 47 |
48 // Modify PYTHONPATH to contain libraries we need. | 48 // Modify PYTHONPATH to contain libraries we need. |
(...skipping 29 matching lines...) Expand all Loading... |
78 file_util::ScopedFD child_fd_closer_; | 78 file_util::ScopedFD child_fd_closer_; |
79 #endif | 79 #endif |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); | 81 DISALLOW_COPY_AND_ASSIGN(LocalTestServer); |
82 }; | 82 }; |
83 | 83 |
84 } // namespace net | 84 } // namespace net |
85 | 85 |
86 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ | 86 #endif // NET_TEST_LOCAL_TEST_SERVER_H_ |
87 | 87 |
OLD | NEW |