| 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_HTTP_REQUEST_H_ | 5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ |
| 6 #define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ | 6 #define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Methods of HTTP requests supported by the test HTTP server. | 25 // Methods of HTTP requests supported by the test HTTP server. |
| 26 enum HttpMethod { | 26 enum HttpMethod { |
| 27 METHOD_UNKNOWN, | 27 METHOD_UNKNOWN, |
| 28 METHOD_GET, | 28 METHOD_GET, |
| 29 METHOD_HEAD, | 29 METHOD_HEAD, |
| 30 METHOD_POST, | 30 METHOD_POST, |
| 31 METHOD_PUT, | 31 METHOD_PUT, |
| 32 METHOD_DELETE, | 32 METHOD_DELETE, |
| 33 METHOD_PATCH, | 33 METHOD_PATCH, |
| 34 METHOD_CONNECT, | 34 METHOD_CONNECT, |
| 35 METHOD_OPTIONS, |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 // Represents a HTTP request. Since it can be big, use scoped_ptr to pass it | 38 // Represents a HTTP request. Since it can be big, use scoped_ptr to pass it |
| 38 // instead of copying. However, the struct is copyable so tests can save and | 39 // instead of copying. However, the struct is copyable so tests can save and |
| 39 // examine a HTTP request. | 40 // examine a HTTP request. |
| 40 struct HttpRequest { | 41 struct HttpRequest { |
| 41 struct CaseInsensitiveStringComparator { | 42 struct CaseInsensitiveStringComparator { |
| 42 bool operator()(const std::string& left, const std::string& right) const { | 43 bool operator()(const std::string& left, const std::string& right) const { |
| 43 return base::CompareCaseInsensitiveASCII(left, right) < 0; | 44 return base::CompareCaseInsensitiveASCII(left, right) < 0; |
| 44 } | 45 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 133 |
| 133 scoped_ptr<HttpChunkedDecoder> chunked_decoder_; | 134 scoped_ptr<HttpChunkedDecoder> chunked_decoder_; |
| 134 | 135 |
| 135 DISALLOW_COPY_AND_ASSIGN(HttpRequestParser); | 136 DISALLOW_COPY_AND_ASSIGN(HttpRequestParser); |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 } // namespace test_server | 139 } // namespace test_server |
| 139 } // namespace net | 140 } // namespace net |
| 140 | 141 |
| 141 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ | 142 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_REQUEST_H_ |
| OLD | NEW |