OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "net/tools/flip_server/balsa_headers.h" | 5 #include "net/tools/balsa/balsa_headers.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <ext/hash_set> | 9 #include <ext/hash_set> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/port.h" | 15 #include "base/port.h" |
| 16 #include "base/strings/string_piece.h" |
16 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
17 #include "base/strings/string_piece.h" | 18 #include "net/tools/balsa/balsa_enums.h" |
18 #include "net/tools/flip_server/balsa_enums.h" | 19 #include "net/tools/balsa/buffer_interface.h" |
19 #include "net/tools/flip_server/buffer_interface.h" | 20 #include "net/tools/balsa/simple_buffer.h" |
20 #include "net/tools/flip_server/simple_buffer.h" | |
21 #include "third_party/tcmalloc/chromium/src/base/googleinit.h" | 21 #include "third_party/tcmalloc/chromium/src/base/googleinit.h" |
22 // #include "util/gtl/iterator_adaptors-inl.h" | |
23 // #include "util/gtl/map-util.h" | |
24 | 22 |
25 namespace { | 23 namespace { |
26 | 24 |
27 const char kContentLength[] = "Content-Length"; | 25 const char kContentLength[] = "Content-Length"; |
28 const char kTransferEncoding[] = "Transfer-Encoding"; | 26 const char kTransferEncoding[] = "Transfer-Encoding"; |
29 const char kSpaceChar = ' '; | 27 const char kSpaceChar = ' '; |
30 | 28 |
31 __gnu_cxx::hash_set<base::StringPiece, | 29 __gnu_cxx::hash_set<base::StringPiece, |
32 net::StringPieceCaseHash, | 30 net::StringPieceCaseHash, |
33 net::StringPieceCaseEqual> g_multivalued_headers; | 31 net::StringPieceCaseEqual> g_multivalued_headers; |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 | 954 |
957 void BalsaHeaders::SetResponseReasonPhrase(const base::StringPiece& reason) { | 955 void BalsaHeaders::SetResponseReasonPhrase(const base::StringPiece& reason) { |
958 // Note: There is no difference between request_version() and | 956 // Note: There is no difference between request_version() and |
959 // response_reason_phrase(). Thus, a function to set one is equivalent to a | 957 // response_reason_phrase(). Thus, a function to set one is equivalent to a |
960 // function to set the other. We maintain two functions for this as it is | 958 // function to set the other. We maintain two functions for this as it is |
961 // much more descriptive, and makes code more understandable. | 959 // much more descriptive, and makes code more understandable. |
962 SetRequestVersion(reason); | 960 SetRequestVersion(reason); |
963 } | 961 } |
964 | 962 |
965 } // namespace net | 963 } // namespace net |
OLD | NEW |