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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // (Note that line continuations should have already been joined; | 65 // (Note that line continuations should have already been joined; |
66 // see HttpUtil::AssembleRawHeaders) | 66 // see HttpUtil::AssembleRawHeaders) |
67 // | 67 // |
68 // HttpResponseHeaders does not perform any encoding changes on the input. | 68 // HttpResponseHeaders does not perform any encoding changes on the input. |
69 // | 69 // |
70 explicit HttpResponseHeaders(const std::string& raw_headers); | 70 explicit HttpResponseHeaders(const std::string& raw_headers); |
71 | 71 |
72 // Initializes from the representation stored in the given pickle. The data | 72 // Initializes from the representation stored in the given pickle. The data |
73 // for this object is found relative to the given pickle_iter, which should | 73 // for this object is found relative to the given pickle_iter, which should |
74 // be passed to the pickle's various Read* methods. | 74 // be passed to the pickle's various Read* methods. |
75 HttpResponseHeaders(const Pickle& pickle, PickleIterator* pickle_iter); | 75 explicit HttpResponseHeaders(PickleIterator* pickle_iter); |
76 | 76 |
77 // Appends a representation of this object to the given pickle. | 77 // Appends a representation of this object to the given pickle. |
78 // The options argument can be a combination of PersistOptions. | 78 // The options argument can be a combination of PersistOptions. |
79 void Persist(Pickle* pickle, PersistOptions options); | 79 void Persist(Pickle* pickle, PersistOptions options); |
80 | 80 |
81 // Performs header merging as described in 13.5.3 of RFC 2616. | 81 // Performs header merging as described in 13.5.3 of RFC 2616. |
82 void Update(const HttpResponseHeaders& new_headers); | 82 void Update(const HttpResponseHeaders& new_headers); |
83 | 83 |
84 // Removes all instances of a particular header. | 84 // Removes all instances of a particular header. |
85 void RemoveHeader(const std::string& name); | 85 void RemoveHeader(const std::string& name); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 409 |
410 // The parsed http version number (not normalized). | 410 // The parsed http version number (not normalized). |
411 HttpVersion parsed_http_version_; | 411 HttpVersion parsed_http_version_; |
412 | 412 |
413 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); | 413 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
414 }; | 414 }; |
415 | 415 |
416 } // namespace net | 416 } // namespace net |
417 | 417 |
418 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 418 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
OLD | NEW |