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_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ | 5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ |
6 #define NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ | 6 #define NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 scoped_ptr<HttpListenSocket> listen_socket_; | 179 scoped_ptr<HttpListenSocket> listen_socket_; |
180 int port_; | 180 int port_; |
181 GURL base_url_; | 181 GURL base_url_; |
182 | 182 |
183 // Owns the HttpConnection objects. | 183 // Owns the HttpConnection objects. |
184 std::map<StreamListenSocket*, HttpConnection*> connections_; | 184 std::map<StreamListenSocket*, HttpConnection*> connections_; |
185 | 185 |
186 // Vector of registered request handlers. | 186 // Vector of registered request handlers. |
187 std::vector<HandleRequestCallback> request_handlers_; | 187 std::vector<HandleRequestCallback> request_handlers_; |
188 | 188 |
| 189 base::ThreadChecker thread_checker_; |
| 190 |
189 // Note: This should remain the last member so it'll be destroyed and | 191 // Note: This should remain the last member so it'll be destroyed and |
190 // invalidate its weak pointers before any other members are destroyed. | 192 // invalidate its weak pointers before any other members are destroyed. |
191 base::WeakPtrFactory<EmbeddedTestServer> weak_factory_; | 193 base::WeakPtrFactory<EmbeddedTestServer> weak_factory_; |
192 | 194 |
193 base::ThreadChecker thread_checker_; | |
194 | |
195 DISALLOW_COPY_AND_ASSIGN(EmbeddedTestServer); | 195 DISALLOW_COPY_AND_ASSIGN(EmbeddedTestServer); |
196 }; | 196 }; |
197 | 197 |
198 } // namespace test_servers | 198 } // namespace test_servers |
199 } // namespace net | 199 } // namespace net |
200 | 200 |
201 #endif // NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ | 201 #endif // NET_TEST_EMBEDDED_TEST_SERVER_EMBEDDED_TEST_SERVER_H_ |
OLD | NEW |