| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ |
| 6 #define NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ | 6 #define NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 public: | 412 public: |
| 413 typedef reverse_iterator_base self; | 413 typedef reverse_iterator_base self; |
| 414 typedef iterator_base::reference reference; | 414 typedef iterator_base::reference reference; |
| 415 typedef iterator_base::pointer pointer; | 415 typedef iterator_base::pointer pointer; |
| 416 using iterator_base::headers_; | 416 using iterator_base::headers_; |
| 417 using iterator_base::idx_; | 417 using iterator_base::idx_; |
| 418 | 418 |
| 419 reverse_iterator_base() : iterator_base() {} | 419 reverse_iterator_base() : iterator_base() {} |
| 420 | 420 |
| 421 // This constructor is no explicit purposely. | 421 // This constructor is no explicit purposely. |
| 422 reverse_iterator_base(const iterator_base& it) : // NOLINT | 422 explicit reverse_iterator_base(const iterator_base& it) : // NOLINT |
| 423 iterator_base(it) { | 423 iterator_base(it) { |
| 424 } | 424 } |
| 425 | 425 |
| 426 self& operator=(const iterator_base& it) { | 426 self& operator=(const iterator_base& it) { |
| 427 idx_ = it.idx_; | 427 idx_ = it.idx_; |
| 428 headers_ = it.headers_; | 428 headers_ = it.headers_; |
| 429 return *this; | 429 return *this; |
| 430 } | 430 } |
| 431 | 431 |
| 432 self& operator=(const reverse_iterator_base& it) { | 432 self& operator=(const reverse_iterator_base& it) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 const_header_lines_iterator(const BalsaHeaders* headers, | 487 const_header_lines_iterator(const BalsaHeaders* headers, |
| 488 HeaderLines::size_type index) : | 488 HeaderLines::size_type index) : |
| 489 iterator_base(headers, index) {} | 489 iterator_base(headers, index) {} |
| 490 }; | 490 }; |
| 491 | 491 |
| 492 class const_reverse_header_lines_iterator : public reverse_iterator_base { | 492 class const_reverse_header_lines_iterator : public reverse_iterator_base { |
| 493 public: | 493 public: |
| 494 typedef const_reverse_header_lines_iterator self; | 494 typedef const_reverse_header_lines_iterator self; |
| 495 const_reverse_header_lines_iterator() : reverse_iterator_base() {} | 495 const_reverse_header_lines_iterator() : reverse_iterator_base() {} |
| 496 | 496 |
| 497 const_reverse_header_lines_iterator( | 497 explicit const_reverse_header_lines_iterator( |
| 498 const const_header_lines_iterator& it) : | 498 const const_header_lines_iterator& it) : |
| 499 reverse_iterator_base(it.headers_, it.idx_) {} | 499 reverse_iterator_base(it.headers_, it.idx_) {} |
| 500 | 500 |
| 501 const_reverse_header_lines_iterator( | 501 const_reverse_header_lines_iterator( |
| 502 const const_reverse_header_lines_iterator& it) : | 502 const const_reverse_header_lines_iterator& it) : |
| 503 reverse_iterator_base(it.headers_, it.idx_) {} | 503 reverse_iterator_base(it.headers_, it.idx_) {} |
| 504 | 504 |
| 505 const_header_lines_iterator base() { | 505 const_header_lines_iterator base() { |
| 506 return const_header_lines_iterator(headers_, idx_); | 506 return const_header_lines_iterator(headers_, idx_); |
| 507 } | 507 } |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 size_t end_of_firstline_idx_; | 1128 size_t end_of_firstline_idx_; |
| 1129 | 1129 |
| 1130 bool transfer_encoding_is_chunked_; | 1130 bool transfer_encoding_is_chunked_; |
| 1131 | 1131 |
| 1132 HeaderLines header_lines_; | 1132 HeaderLines header_lines_; |
| 1133 }; | 1133 }; |
| 1134 | 1134 |
| 1135 } // namespace net | 1135 } // namespace net |
| 1136 | 1136 |
| 1137 #endif // NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ | 1137 #endif // NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_ |
| OLD | NEW |