QUICHE team | 82dee2f | 2019-01-18 12:35:12 -0500 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "net/third_party/quiche/src/spdy/core/array_output_buffer.h" |
| 6 | |
| 7 | namespace spdy { |
| 8 | |
| 9 | void ArrayOutputBuffer::Next(char** data, int* size) { |
| 10 | *data = current_; |
| 11 | *size = capacity_ > 0 ? capacity_ : 0; |
| 12 | } |
| 13 | |
| 14 | void ArrayOutputBuffer::AdvanceWritePtr(int64_t count) { |
| 15 | current_ += count; |
| 16 | capacity_ -= count; |
| 17 | } |
| 18 | |
| 19 | uint64_t ArrayOutputBuffer::BytesFree() const { |
| 20 | return capacity_; |
| 21 | } |
| 22 | |
| 23 | } // namespace spdy |