OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/spdy/core/spdy_prefixed_buffer_reader.h" | 5 #include "net/spdy/core/spdy_prefixed_buffer_reader.h" |
6 | 6 |
| 7 #include <new> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 | 10 |
9 namespace net { | 11 namespace net { |
10 | 12 |
11 SpdyPrefixedBufferReader::SpdyPrefixedBufferReader( | 13 SpdyPrefixedBufferReader::SpdyPrefixedBufferReader( |
12 const char* prefix, | 14 const char* prefix, |
13 size_t prefix_length, | 15 size_t prefix_length, |
14 const char* suffix, | 16 const char* suffix, |
15 size_t suffix_length) | 17 size_t suffix_length) |
16 : prefix_(prefix), | 18 : prefix_(prefix), |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 DCHECK(suffix_length_ >= count); | 76 DCHECK(suffix_length_ >= count); |
75 // Read is fully satisfied by the suffix. | 77 // Read is fully satisfied by the suffix. |
76 out->buffer_ = suffix_; | 78 out->buffer_ = suffix_; |
77 suffix_ += count; | 79 suffix_ += count; |
78 suffix_length_ -= count; | 80 suffix_length_ -= count; |
79 return true; | 81 return true; |
80 } | 82 } |
81 } | 83 } |
82 | 84 |
83 } // namespace net | 85 } // namespace net |
OLD | NEW |