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_HTTP_HTTP_RESPONSE_HEADERS_H_ | 5 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "net/base/net_export.h" | 15 #include "net/base/net_export.h" |
16 #include "net/http/http_version.h" | 16 #include "net/http/http_version.h" |
17 | 17 |
18 class Pickle; | 18 class Pickle; |
| 19 class PickleIterator; |
19 | 20 |
20 namespace base { | 21 namespace base { |
21 class Time; | 22 class Time; |
22 class TimeDelta; | 23 class TimeDelta; |
23 } | 24 } |
24 | 25 |
25 namespace net { | 26 namespace net { |
26 | 27 |
27 // HttpResponseHeaders: parses and holds HTTP response headers. | 28 // HttpResponseHeaders: parses and holds HTTP response headers. |
28 class NET_EXPORT HttpResponseHeaders | 29 class NET_EXPORT HttpResponseHeaders |
(...skipping 16 matching lines...) Expand all Loading... |
45 // (Note that line continuations should have already been joined; | 46 // (Note that line continuations should have already been joined; |
46 // see HttpUtil::AssembleRawHeaders) | 47 // see HttpUtil::AssembleRawHeaders) |
47 // | 48 // |
48 // HttpResponseHeaders does not perform any encoding changes on the input. | 49 // HttpResponseHeaders does not perform any encoding changes on the input. |
49 // | 50 // |
50 explicit HttpResponseHeaders(const std::string& raw_headers); | 51 explicit HttpResponseHeaders(const std::string& raw_headers); |
51 | 52 |
52 // Initializes from the representation stored in the given pickle. The data | 53 // Initializes from the representation stored in the given pickle. The data |
53 // for this object is found relative to the given pickle_iter, which should | 54 // for this object is found relative to the given pickle_iter, which should |
54 // be passed to the pickle's various Read* methods. | 55 // be passed to the pickle's various Read* methods. |
55 HttpResponseHeaders(const Pickle& pickle, void** pickle_iter); | 56 HttpResponseHeaders(const Pickle& pickle, PickleIterator* pickle_iter); |
56 | 57 |
57 // Appends a representation of this object to the given pickle. | 58 // Appends a representation of this object to the given pickle. |
58 // The options argument can be a combination of PersistOptions. | 59 // The options argument can be a combination of PersistOptions. |
59 void Persist(Pickle* pickle, PersistOptions options); | 60 void Persist(Pickle* pickle, PersistOptions options); |
60 | 61 |
61 // Performs header merging as described in 13.5.3 of RFC 2616. | 62 // Performs header merging as described in 13.5.3 of RFC 2616. |
62 void Update(const HttpResponseHeaders& new_headers); | 63 void Update(const HttpResponseHeaders& new_headers); |
63 | 64 |
64 // Removes all instances of a particular header. | 65 // Removes all instances of a particular header. |
65 void RemoveHeader(const std::string& name); | 66 void RemoveHeader(const std::string& name); |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 360 |
360 // The parsed http version number (not normalized). | 361 // The parsed http version number (not normalized). |
361 HttpVersion parsed_http_version_; | 362 HttpVersion parsed_http_version_; |
362 | 363 |
363 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); | 364 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
364 }; | 365 }; |
365 | 366 |
366 } // namespace net | 367 } // namespace net |
367 | 368 |
368 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 369 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
OLD | NEW |