| 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 24 matching lines...) Expand all Loading... |
| 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/files/file_path.h" | 42 #include "base/files/file_path.h" |
| 43 #include "base/files/memory_mapped_file.h" | 43 #include "base/files/memory_mapped_file.h" |
| 44 #include "base/message_loop.h" | 44 #include "base/message_loop.h" |
| 45 #include "net/base/stream_listen_socket.h" | 45 #include "net/socket/stream_listen_socket.h" |
| 46 | 46 |
| 47 namespace test_server { | 47 namespace test_server { |
| 48 | 48 |
| 49 class Request { | 49 class Request { |
| 50 public: | 50 public: |
| 51 Request() : content_length_(0) { | 51 Request() : content_length_(0) { |
| 52 } | 52 } |
| 53 | 53 |
| 54 void ParseHeaders(const std::string& headers); | 54 void ParseHeaders(const std::string& headers); |
| 55 | 55 |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 scoped_refptr<net::StreamListenSocket> server_; | 440 scoped_refptr<net::StreamListenSocket> server_; |
| 441 ConnectionList connection_list_; | 441 ConnectionList connection_list_; |
| 442 | 442 |
| 443 DISALLOW_COPY_AND_ASSIGN(HTTPTestServer); | 443 DISALLOW_COPY_AND_ASSIGN(HTTPTestServer); |
| 444 }; | 444 }; |
| 445 | 445 |
| 446 } // namespace test_server | 446 } // namespace test_server |
| 447 | 447 |
| 448 #endif // CHROME_FRAME_TEST_TEST_SERVER_H_ | 448 #endif // CHROME_FRAME_TEST_TEST_SERVER_H_ |
| OLD | NEW |