| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 explicit HttpResponseHeaders(const std::string& raw_headers); | 72 explicit HttpResponseHeaders(const std::string& raw_headers); |
| 73 | 73 |
| 74 // Initializes from the representation stored in the given pickle. The data | 74 // Initializes from the representation stored in the given pickle. The data |
| 75 // for this object is found relative to the given pickle_iter, which should | 75 // for this object is found relative to the given pickle_iter, which should |
| 76 // be passed to the pickle's various Read* methods. | 76 // be passed to the pickle's various Read* methods. |
| 77 explicit HttpResponseHeaders(base::PickleIterator* pickle_iter); | 77 explicit HttpResponseHeaders(base::PickleIterator* pickle_iter); |
| 78 | 78 |
| 79 // Appends a representation of this object to the given pickle. | 79 // Appends a representation of this object to the given pickle. |
| 80 // The options argument can be a combination of PersistOptions. | 80 // The options argument can be a combination of PersistOptions. |
| 81 void Persist(base::Pickle* pickle, PersistOptions options); | 81 void Persist(base::Pickle* pickle, PersistOptions options); |
| 82 // Does the same as Persist, but puts the output string to |*output|. |
| 83 void PersistTo(PersistOptions options, std::string* output); |
| 82 | 84 |
| 83 // Performs header merging as described in 13.5.3 of RFC 2616. | 85 // Performs header merging as described in 13.5.3 of RFC 2616. |
| 84 void Update(const HttpResponseHeaders& new_headers); | 86 void Update(const HttpResponseHeaders& new_headers); |
| 85 | 87 |
| 86 // Removes all instances of a particular header. | 88 // Removes all instances of a particular header. |
| 87 void RemoveHeader(const std::string& name); | 89 void RemoveHeader(const std::string& name); |
| 88 | 90 |
| 89 // Removes a particular header line. The header name is compared | 91 // Removes a particular header line. The header name is compared |
| 90 // case-insensitively. | 92 // case-insensitively. |
| 91 void RemoveHeaderLine(const std::string& name, const std::string& value); | 93 void RemoveHeaderLine(const std::string& name, const std::string& value); |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 | 424 |
| 423 // The normalized http version (consistent with what GetStatusLine() returns). | 425 // The normalized http version (consistent with what GetStatusLine() returns). |
| 424 HttpVersion http_version_; | 426 HttpVersion http_version_; |
| 425 | 427 |
| 426 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); | 428 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
| 427 }; | 429 }; |
| 428 | 430 |
| 429 } // namespace net | 431 } // namespace net |
| 430 | 432 |
| 431 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 433 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
| OLD | NEW |