| 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 CHROME_FRAME_TEST_TEST_SERVER_H_ | 5 #ifndef CHROME_FRAME_TEST_TEST_SERVER_H_ |
| 6 #define CHROME_FRAME_TEST_TEST_SERVER_H_ | 6 #define CHROME_FRAME_TEST_TEST_SERVER_H_ |
| 7 | 7 |
| 8 // Implementation of an HTTP server for tests. | 8 // Implementation of an HTTP server for tests. |
| 9 // To instantiate the server, make sure you have a message loop on the | 9 // To instantiate the server, make sure you have a message loop on the |
| 10 // current thread and then create an instance of the SimpleWebServer class. | 10 // current thread and then create an instance of the SimpleWebServer class. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // based on some data, serve up dynamic content or take some action on the | 33 // based on some data, serve up dynamic content or take some action on the |
| 34 // server), just inherit from one of the response classes or directly from the | 34 // server), just inherit from one of the response classes or directly from the |
| 35 // Response interface and add your response object to the server's list of | 35 // Response interface and add your response object to the server's list of |
| 36 // response objects. | 36 // response objects. |
| 37 | 37 |
| 38 #include <list> | 38 #include <list> |
| 39 #include <string> | 39 #include <string> |
| 40 | 40 |
| 41 #include "base/basictypes.h" | 41 #include "base/basictypes.h" |
| 42 #include "base/file_util.h" | 42 #include "base/file_util.h" |
| 43 #include "base/message_loop.h" |
| 43 #include "net/base/listen_socket.h" | 44 #include "net/base/listen_socket.h" |
| 44 | 45 |
| 45 namespace test_server { | 46 namespace test_server { |
| 46 | 47 |
| 47 class Request { | 48 class Request { |
| 48 public: | 49 public: |
| 49 Request() : content_length_(0) { | 50 Request() : content_length_(0) { |
| 50 } | 51 } |
| 51 | 52 |
| 52 void ParseHeaders(const std::string& headers); | 53 void ParseHeaders(const std::string& headers); |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 | 418 |
| 418 scoped_refptr<net::ListenSocket> server_; | 419 scoped_refptr<net::ListenSocket> server_; |
| 419 ConnectionList connection_list_; | 420 ConnectionList connection_list_; |
| 420 | 421 |
| 421 DISALLOW_COPY_AND_ASSIGN(HTTPTestServer); | 422 DISALLOW_COPY_AND_ASSIGN(HTTPTestServer); |
| 422 }; | 423 }; |
| 423 | 424 |
| 424 } // namespace test_server | 425 } // namespace test_server |
| 425 | 426 |
| 426 #endif // CHROME_FRAME_TEST_TEST_SERVER_H_ | 427 #endif // CHROME_FRAME_TEST_TEST_SERVER_H_ |
| OLD | NEW |