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/flip_server/balsa_headers.h" |
6 | 6 |
| 7 #include <stdio.h> |
7 #include <algorithm> | 8 #include <algorithm> |
8 #include <ext/hash_set> | 9 #include <ext/hash_set> |
9 #include <string> | 10 #include <string> |
10 #include <utility> | 11 #include <utility> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/port.h" | 15 #include "base/port.h" |
| 16 #include "base/stringprintf.h" |
15 #include "base/string_piece.h" | 17 #include "base/string_piece.h" |
16 #include "base/string_util.h" | |
17 #include "net/tools/flip_server/balsa_enums.h" | 18 #include "net/tools/flip_server/balsa_enums.h" |
18 #include "net/tools/flip_server/buffer_interface.h" | 19 #include "net/tools/flip_server/buffer_interface.h" |
19 #include "net/tools/flip_server/simple_buffer.h" | 20 #include "net/tools/flip_server/simple_buffer.h" |
20 #include "third_party/tcmalloc/chromium/src/base/googleinit.h" | 21 #include "third_party/tcmalloc/chromium/src/base/googleinit.h" |
21 // #include "util/gtl/iterator_adaptors-inl.h" | 22 // #include "util/gtl/iterator_adaptors-inl.h" |
22 // #include "util/gtl/map-util.h" | 23 // #include "util/gtl/map-util.h" |
23 | 24 |
24 namespace { | 25 namespace { |
25 | 26 |
26 const char kContentLength[] = "Content-Length"; | 27 const char kContentLength[] = "Content-Length"; |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 | 923 |
923 void BalsaHeaders::SetResponseReasonPhrase(const base::StringPiece& reason) { | 924 void BalsaHeaders::SetResponseReasonPhrase(const base::StringPiece& reason) { |
924 // Note: There is no difference between request_version() and | 925 // Note: There is no difference between request_version() and |
925 // response_reason_phrase(). Thus, a function to set one is equivalent to a | 926 // response_reason_phrase(). Thus, a function to set one is equivalent to a |
926 // function to set the other. We maintain two functions for this as it is | 927 // function to set the other. We maintain two functions for this as it is |
927 // much more descriptive, and makes code more understandable. | 928 // much more descriptive, and makes code more understandable. |
928 SetRequestVersion(reason); | 929 SetRequestVersion(reason); |
929 } | 930 } |
930 | 931 |
931 } // namespace net | 932 } // namespace net |
OLD | NEW |